This is a migrated thread and some comments may be shown as answers.

GridClientSelectColumn Header checkbox

3 Answers 257 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 21 Nov 2008, 06:16 PM
I want to disable the column header checkbox on a GridClientSelectColumn. The behaviour of the checkbox is to check or uncheck all items. I wish to not have that functionality.

3 Answers, 1 is accepted

Sort by
0
Jeff
Top achievements
Rank 1
answered on 21 Nov 2008, 07:10 PM
UPDATE: I need to keep the AllowMultiRowSelection = true so the user can select multiple rows. I just want to get rid of the header column checkbox to check / uncheck all.
0
Accepted
Shinu
Top achievements
Rank 2
answered on 24 Nov 2008, 04:30 AM
Hi Jeff,

You can either hide or disable the header CheckBox in the code behind as shown below.

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; 
            header["SelectCol"].Controls[0].Visible = false
        } 
    } 


Regards
Shinu.
0
Jeff
Top achievements
Rank 1
answered on 24 Nov 2008, 04:45 PM
Thankyou, that works
Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Answers by
Jeff
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or