RadGrid with GridClientSelectColumn

2 posts, 1 answers
  1. Amitkumar
    Amitkumar avatar
    66 posts
    Member since:
    Aug 2009

    Posted 30 Nov 2009 Link to this post

    Hell Friends,

    I am usig RadGrid with GridClientSelectColumn mention below:
    <telerik:GridClientSelectColumn UniqueName="SelectColumn" />

    when loading a page that time i would like to select all row with that column checkbox should be checked, and i am using following code, but it will not work, what was the wrong with that code in ItemCreated event, reply me.

    if (e.Item.ItemType == GridItemType.Item)
                    GridDataItem item = (GridDataItem)e.Item;
                    CheckBox checkBox = (CheckBox)item["SelectColumn"].Controls[0];
                    checkBox.Checked = true;
  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 30 Nov 2009 Link to this post

    Hello Amit,

    You can try out the following code instead to set the GridClientSelectColumn checkboxes checked:
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
            if (e.Item is GridDataItem) 
                GridDataItem item = (GridDataItem)e.Item; 
                item.Selected = true

  3. DevCraft R3 2016 release webinar banner
Back to Top