Hi,
Thanks for responding. I understand that there will be a postback. My current implementation is as follows: I have a checkbox which the user clicks to enable batch edit mode. On the client side checkChanged event i set a hiddenfield as my flag indicating batch edit is enabled. On the server side check event I switch the radgrid to batch edit and rebind.
My issue with this method is that I have multiple radgrid's on the page where based on the page setup and settings only some are rendered to the client. Because of this, the checkbox is embedded into each radgrid causing each radgrid's batch edit mode to be controlled independently. I would like to abstract this to a single checkbox controlling batch edit mode in all the grids.
I could just handle the checkchanged event server side, and switch all my grids to batch edit mode, but because some are not rendering I need a lot of extra convoluted logic to ensure only the grids rendering are switched to batch edit. Additionally, as settings are changed via partial ajax postbacks and more grids become visible, i need to execute my logic again to ensure all grids are in batch edit mode. Now, because there are multiple settings that could cause a grid to become visible, this logic needs to be implemented in multiple places leading to messy and poor code.
What I would like to do, is set the flag indicating batch edit mode client side. Then, because I have a single method handling my grids client-side onCommand event, that is where i would like to switch to batch edit mode. Sort of lazy initialization, where I would have a flag indicating batch edit is on but only switch the grid to batch edit when an editcommand is raised for the grid.
I may be able to use fireCommand with a custom command, but that again may lead to a whole bunch of extra code. I was hoping there was an internal built in way to do this.