![](/forums/images/avatarimages/default.gif)
Chen Jun Ying
Top achievements
Rank 1
Chen Jun Ying
asked on 14 Feb 2012, 02:21 PM
Hi all,
How to disable GridClientSelectColumn checkbox in some of the rows? Which grid event shall I look into? How can I reference to the checkbox?
Thanks
Chen.
How to disable GridClientSelectColumn checkbox in some of the rows? Which grid event shall I look into? How can I reference to the checkbox?
Thanks
Chen.
6 Answers, 1 is accepted
0
Hello Chen,
I hope the following code library will help you for your implementation:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/disable-selection-for-some-rows-in-gridclientselectcolumn-conditionally.aspx
Kind regards,
Pavlina
the Telerik team
I hope the following code library will help you for your implementation:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/disable-selection-for-some-rows-in-gridclientselectcolumn-conditionally.aspx
Kind regards,
Pavlina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
![](/forums/images/avatarimages/default.gif)
Chen Jun Ying
Top achievements
Rank 1
answered on 15 Feb 2012, 10:35 AM
Thanks Pavlina.
Just further our discussion.. Is it possible to make the select/unselect all checkbox work in the header? The solution you provided breaks the unselect all function. I believe GridClientSelectColumn still count those disabled rows.
Just further our discussion.. Is it possible to make the select/unselect all checkbox work in the header? The solution you provided breaks the unselect all function. I believe GridClientSelectColumn still count those disabled rows.
0
Hello Chen,
Can you please specify which version of RadControls you are using?
Kind regards,
Pavlina
the Telerik team
Can you please specify which version of RadControls you are using?
Kind regards,
Pavlina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
![](/forums/images/avatarimages/default.gif)
Chen Jun Ying
Top achievements
Rank 1
answered on 15 Feb 2012, 01:50 PM
Hi Pavlina,
I found the solution in the cdoe library. Thank you.
http://www.telerik.com/community/code-library/aspnet-ajax/grid/gridclientselectcolumn-select-all-rows-with-enabled-check-boxes-only.aspx
I found the solution in the cdoe library. Thank you.
http://www.telerik.com/community/code-library/aspnet-ajax/grid/gridclientselectcolumn-select-all-rows-with-enabled-check-boxes-only.aspx
0
![](/forums/images/avatarimages/1db05a92-c83b-47d2-bf88-a332b11c12d0475306_454572991235333_608329304_o.jpg)
Fernando
Top achievements
Rank 2
answered on 08 Dec 2016, 12:07 PM
It is so much easier to use dataItem.SelectableMode = GridItemSelectableMode.None; in the OnItemCreated event
protected
void
OnItemCreated(
object
seneder, GridItemEventArgs e)
{
try
{
if
(e.Item
is
GridDataItem && e.Item.DataItem !=
null
)
{
GridDataItem dataItem = e.Item
as
GridDataItem;
DocumentInfo revisao = (DocumentInfo)e.Item.DataItem;
// Condition to desable the row
if
(revisao.id_revisao.Equals(2)))
{
CheckBox checkBox = (CheckBox)dataItem[
"ClientSelectColumn"
].Controls[0];
checkBox.Enabled =
false
;
dataItem.ForeColor = Color.Gray;
// here we disable the row
dataItem.SelectableMode = GridItemSelectableMode.None;
}
}
}
catch
{ }
}
0
![](/forums/images/avatarimages/default.gif)
Richa Chauhan
Top achievements
Rank 1
answered on 04 Mar 2020, 06:24 PM
This was very useful !