ASP.NET - keeping checkbox's state when in datagrid
Posted on 2002-06-17
PLEASE HELP ME!!!!!!!!
I am creating a datagrid and populating it dynamically, no problem, and I have embedded checkboxes in the first 2 columns.
When the user clicks a button on the page, I am iterating through the datagrid to check the value of the checkboxes.
I have no problem referencing the checkboxes, but as soon as the button is pressed, they lose state.
Can I get the values from them before the button causes postback? the rest of the fields hold their state during postback, as does any checkbox created outside the datagrid.
Their 'holdstate' (can't remember the actual name, but you get the drift) property is set to true.
Could I just bind the checkbox to the cell it sits in?
Can I handle the statechange of the checkbox? (I dont seem to be able to do it normally)
If you can give me the working answer to any of these (or a decent work around) the points are yours, if it's particularly neat, I may give you some more...