ChainsawJoe
Programmer
Hi all,
Need some pointers please - I'm dynamically creating a Table Webcontrol (i.e., *not* a Table HTMLControl) and adding checkboxes into some of the TDs. The "checked" status is being set depending on the current values in certain objects.
I'm then allowing the user to change the status of these checkboxes and click a "Save" button to update the values.
Obviously, since these are dynamically created content then the data is lost in the postback. I can add the table to the viewstate, but I won't even see the "updated" data, since nothing is posted on submission.
How would you suggest I handle this? How can I get the user input (i.e., the user unchecked checkbox for CustomerID #1 and AddressID #15 (not the IDs I'm using, but easier to demonstrate with) and checked the checkboxes for CustomerID #3, AddressIDs #24 and #27)?
Should I be using a little javascript to save a string in a couple of hidden input fields to define which chkbxes are checked and which are not?
Extra info: the table does not map directly to any object structure.
Many thanks,
CJ
Need some pointers please - I'm dynamically creating a Table Webcontrol (i.e., *not* a Table HTMLControl) and adding checkboxes into some of the TDs. The "checked" status is being set depending on the current values in certain objects.
I'm then allowing the user to change the status of these checkboxes and click a "Save" button to update the values.
Obviously, since these are dynamically created content then the data is lost in the postback. I can add the table to the viewstate, but I won't even see the "updated" data, since nothing is posted on submission.
How would you suggest I handle this? How can I get the user input (i.e., the user unchecked checkbox for CustomerID #1 and AddressID #15 (not the IDs I'm using, but easier to demonstrate with) and checked the checkboxes for CustomerID #3, AddressIDs #24 and #27)?
Should I be using a little javascript to save a string in a couple of hidden input fields to define which chkbxes are checked and which are not?
Extra info: the table does not map directly to any object structure.
Many thanks,
CJ