if (e.Item is GridDataItem)
GridDataItem item = (GridDataItem)e.Item;
CheckBox chkbx = (CheckBox)item["ClientSelectColumn"].Controls;
"OnClick", "return alert('" + chkbx.Checked + "');");
But every time, the value is displayed as false after I check the box. I just want to get the value of the checkbox after it is selected.
14 Answers, 1 is accepted
If there is a scenario where the grid only has one row, the user should be able to uncheck the checkbox after checking it.
You can use 'OnRowSelected' and 'OnRowDeselected' ClientEvent of RadGrid' which will fire when you select/deselect the rows in Radgrid. Sample code is given below.
Thanks for your help.
You can try the following code snippet to access ClientSelectColumn.
I tried to access the clientselectcolumn checkbox from the item_databound event and that seems to be working fine. But how to capture the status change for the check box as it happens through the client side and cannot be captured through the databound event.
For client-side you can use the following event handler:
And for server - the approach demonstrated in this article:
I hope this will prove helpful.
Telerik by Progress
Hi, actually the issue is that we add the GridClientSelectColumn but on that command we want to post back to run a serverside code to enable a few other buttons and things on the page. Is this possible to use the GridClientSelectColumn to post back or trigger some kind of grid event when you select the top checkbox in the header?
of course we can just use client side to manually submit the page but I was trying to stick to asp.net events if possible.
so please yes or no can we do a server side post back on the selection of the actual GridClientSelectColumn the top check box in the HEADER.
The magic is this part:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
if (e.Item is GridHeaderItem)
GridHeaderItem headerItem = (GridHeaderItem)e.Item;
CheckBox headerChkBox = (CheckBox)headerItem["GridClientSelectColumn"].Controls;
headerChkBox.AutoPostBack = true;
headerChkBox.CheckedChanged += new EventHandler(headerChkBox_CheckedChanged);
How Can get all Selected values id of Using GridClientSelectColumn on ClientSide?.Kindly Explain me.
You can use the following event handler for individual rows:
In order to get all of them on an external action like button click, you can use the get_selectedItems() method:
I also suggest that you examine the sample provided at the last post here:
Here you can find proper steps of updating Sitefinity CMS:
If you have further questions, you can open a new thread addressing your queries and select the Sitefinity product.