Hi all,
I have a grid that allows multiple row selection however it does not allow certain rows to be selected with others. Therefore, I would like to hide the checkbox in the header since I never permit to select all rows.
In addition, how can I check on the client side that a certain row is not selected when other rows are already selected?
Thanks,
Avi
I have a grid that allows multiple row selection however it does not allow certain rows to be selected with others. Therefore, I would like to hide the checkbox in the header since I never permit to select all rows.
In addition, how can I check on the client side that a certain row is not selected when other rows are already selected?
Thanks,
Avi
4 Answers, 1 is accepted
0
Accepted
Princy
Top achievements
Rank 2
answered on 07 Jul 2008, 04:52 AM
Hi Avi,
Try the following code snippet to hide the header CheckBox in the GridClientSelectColumn when multiple row selection is enabled in RadGrid.
ASPX:
CS:
Thanks
Princy.
Try the following code snippet to hide the header CheckBox in the GridClientSelectColumn when multiple row selection is enabled in RadGrid.
ASPX:
| <telerik:GridClientSelectColumn UniqueName="SelectCol" ></telerik:GridClientSelectColumn> |
CS:
| protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) |
| { |
| if (e.Item is GridHeaderItem) |
| { |
| GridHeaderItem header = (GridHeaderItem)e.Item; |
| CheckBox chkbx = (CheckBox)header["SelectCol"].Controls[0]; |
| chkbx.Visible = false; |
| } |
| } |
Thanks
Princy.
0
Avi
Top achievements
Rank 1
answered on 07 Jul 2008, 10:18 AM
Thanks!
0
Shinu
Top achievements
Rank 2
answered on 07 Jul 2008, 10:25 AM
Hi Avi,
You can also refer the following help document link which explains how to access cells in Grid.
Accessing cells and rows
Shinu.
You can also refer the following help document link which explains how to access cells in Grid.
Accessing cells and rows
Shinu.
0
Amber
Top achievements
Rank 1
answered on 02 Dec 2009, 06:33 PM
i tried this in a nested grid where some row selectors were disabled. it worked, but caused rendering problems, especially if all the rows under the parent node were disabled. i fixed it by using the following in place of visible = false:
chk.Style.Add(
"visibility", "hidden")