Home All Groups Group Topic Archive Search About

Gridview controls added programmatically does not appear later

Author
15 Jan 2007 2:20 PM
KMILO
Hello everyone,

Im implementing a gridview to render some controls depending of the
databound conditions, in some cases are textboxes in another cases are
dropdownlists, the grid seems to be working well, in the page appears the
controls and let me put or choose values in them, but when a I fire a submit
button and try to iterate into the gridview rows, the controls dissappears
also I check into the page source and they are gone too! (Im newbie on this
control as you can see, lol) any ideas of how can i get these controls?

thanks in advance

KMILO

environment used:
Framework v.2.0
windows xp
sql 2003 db
ajax updatepanel

Author
17 Jan 2007 8:39 AM
Piotr Nowak
KMILO napisa³(a):
Show quoteHide quote
> Hello everyone,
>
> Im implementing a gridview to render some controls depending of the
> databound conditions, in some cases are textboxes in another cases are
> dropdownlists, the grid seems to be working well, in the page appears the
> controls and let me put or choose values in them, but when a I fire a submit
> button and try to iterate into the gridview rows, the controls dissappears
> also I check into the page source and they are gone too! (Im newbie on this
> control as you can see, lol) any ideas of how can i get these controls?
>
> thanks in advance
>
> KMILO
>
> environment used:
> Framework v.2.0
> windows xp
> sql 2003 db
> ajax updatepanel
>
>
>

True, I have the same issue.
Whats the solution ???

I Resolved this problem by doing GridViewInstance.DataBind() on every
postback, but this causes that data i typed into rows dissapear.
Of course data dissapears, because gridview rebinds all values to their
default values which are simply empty...

im creating controls dynamically in gridview using rowdatabound event...

any suggestion ?