>i have develop a sharepoint web part using class library.i add
> controls programatically.when i select a item in dropdownlist and save
> it to the datase.it sved the first item of the dropdownlist,not the
> selected item.as my experience this happen due to the inoder sequence
> of CreateChildControl() fires.Can any one help to solve this materr?
Where are you adding the controls?
Where are you binding the data?
Ensure that the control is created in CreateChildControls.

Signature
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
hsnkamal@yahoo.com - 25 Jun 2007 09:24 GMT
On Jun 16, 7:16 am, "MasterGaurav \(www.edujini-labs.com\)"
<gaurav.vaish.nos...@nospam.gmail.com> wrote:
> >i have develop a sharepoint web part using class library.i add
> > controls programatically.when i select a item in dropdownlist and save
[quoted text clipped - 11 lines]
> Gaurav Vaish |www.mastergaurav.comwww.edujini-labs.comhttp://eduzine.edujini-labs.com
> -----------------------------------------
i have created grid inside the create childcontrol().and also i have
bind it there.i anable the editbutton and at the edit event i have
added a dropdown list to the cell
MasterGaurav (www.edujini-labs.com) - 26 Jun 2007 17:49 GMT
> i have created grid inside the create childcontrol().and also i have
> bind it there.i anable the editbutton and at the edit event i have
> added a dropdown list to the cell
Are you rebinding the grid? I must be rebound everytime... unconditionally.
And after the "Edit" is performed, it must be rebound (with appropriate
EditItemIndex set) again.

Signature
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------