Hi,
I have a rad grid in which first template column and checkbox control in that column.
I have set AutoPostBack="false" and write one event OnCheckedChanged="CheckChanged" at the server side.
in this event I am calculating the count of selected rows and stored it in VewSte("RowCount") variable.
When I select any record by checking that checkbox and change pageindex, then first fire "CheckChanged" event (no of times as many rows selected. e.g. 2 rows selected then 2 times goes to this event) and then pageindexchanged event fire. So I have getting correct result of view state. in these events at serveside.
There is a one button below the RadGrid which is enable disable based on no of rows selected. If no rows selected then that button is disble otherwise enable. So I need viewstate value for decide where button is enable or disable.
I have write client click event of checkbox like OnClick=fnClientClick(),
i which i am getting this viewstate varianble value by using
var count = ''<%=ViewState("RowCount")%>;
but always I get blank. I cannot get true value.
I have also try by replacing viewstate to hiden variable.
but I can not get value...
Can u give me suggetion how can I get the viewstate value at client side?
Thanks
Arti Khachariya
I have a rad grid in which first template column and checkbox control in that column.
I have set AutoPostBack="false" and write one event OnCheckedChanged="CheckChanged" at the server side.
in this event I am calculating the count of selected rows and stored it in VewSte("RowCount") variable.
When I select any record by checking that checkbox and change pageindex, then first fire "CheckChanged" event (no of times as many rows selected. e.g. 2 rows selected then 2 times goes to this event) and then pageindexchanged event fire. So I have getting correct result of view state. in these events at serveside.
There is a one button below the RadGrid which is enable disable based on no of rows selected. If no rows selected then that button is disble otherwise enable. So I need viewstate value for decide where button is enable or disable.
I have write client click event of checkbox like OnClick=fnClientClick(),
i which i am getting this viewstate varianble value by using
var count = ''<%=ViewState("RowCount")%>;
but always I get blank. I cannot get true value.
I have also try by replacing viewstate to hiden variable.
but I can not get value...
Can u give me suggetion how can I get the viewstate value at client side?
Thanks
Arti Khachariya