views:

188

answers:

5

I have a radgrid controlling access to an application for users. There are two columns, a 'name' column and a checkbox 'access' column representing their current access permission. the checkboxes are populated from a database. I would like the to change the checkboxes to grant or deny access to the users I specify. Since there are alot of users I would like to make multiple changes and use a submit button to write the changes to the database. I do not want to postback with each checkbox change and wait for the page to "blink". My problem is that with the checkbox postback disabled, when I click submit, the value of the checkboxes are not registering the changes I make. I need a way to access the current client-side state of the checkbox or some workaround to accomplish this.

Thanks in advance!

A: 

If you set AutoPostBack to false, that will disable the postback, but they should still be posting their current values.

Sounds to me more like an issue with the dynamic generation of the checkboxes.

womp
A: 

Not sure why you are not able to access the values of checkbox at server side, but to answer your question "I need a way to access the current client-side state of the checkbox or some workaround to accomplish this"...

You can use server tags and read the values of checkboxes at client side.

For more information about server tags, read this MSDN link.

Amby
+1  A: 

You could use javascript to send an ajax request that saves the change to the database without reloading the page. Then your updates happen right away and there's no "blink".

Joel Coehoorn
this is definitely the way to go, its faster and simpler.
luke
A: 

have the same problem .. i have a grid and a checkbox on every row.. i wand to select same rows and then sumit button to do some precessing on server side..

radu
A: 

Thank you for the support. It turns out that the issue wasnt with client/server-side visibility, but with the page lifecycle. I was refreshing the radgrid in the PageLoad method and checking the value of the checkboxes in the Submit method. I didn't realize PageLoad was executed prior to Submit, thus clearing my selections. By removing the RadGrid refresh from PageLoad, the current values of the checkboxs were preserved.

Starwfanatic