J
Jeff User
Hi all
I need to create datagris dynamically in C# code.
I placed a PlaceHolder object on my form and then as Datagrids are
created, they are added to the PlaceHolder. This works and display
well but on postback, my PlaceHolder object has no controls.i.e.
PlaceHolder1.Controls.Count is 0
I can determine the IDs of the grids created which allows me to use
FindControl, but FindControl also does not find them.
One of the columns in the grids is a textbox that the user fills in a
number. I need to capture this number (if entered).
Some article state that the controls need to be re-created on
postback. How do I do this, without losing the values that the user
filled in? When I recreate the same grid controls again, the new text
boxes are empty (of course).
Thanks
Jeff
I need to create datagris dynamically in C# code.
I placed a PlaceHolder object on my form and then as Datagrids are
created, they are added to the PlaceHolder. This works and display
well but on postback, my PlaceHolder object has no controls.i.e.
PlaceHolder1.Controls.Count is 0
I can determine the IDs of the grids created which allows me to use
FindControl, but FindControl also does not find them.
One of the columns in the grids is a textbox that the user fills in a
number. I need to capture this number (if entered).
Some article state that the controls need to be re-created on
postback. How do I do this, without losing the values that the user
filled in? When I recreate the same grid controls again, the new text
boxes are empty (of course).
Thanks
Jeff