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

In RadGrid control how to cheked the Chebox exist in the HeaderTemplate in ItemDataBound event

1 Answer 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
pankaj
Top achievements
Rank 1
pankaj asked on 27 Oct 2008, 11:47 AM
Hi,

 In RadGrid control how to cheked the Chebox exist in the HeaderTemplate in ItemDataBound event, Please solve my problem how to checked the CheckBox exist in the Header option of the colulmn in ItemDataBound Event of RadGrid control.

Thanks
Pankaj Tyagi

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 27 Oct 2008, 12:06 PM
Hello Pankaj,

Try out the following code to get the header checkbox checked.
cs:
protected void RadGrid2_ItemDataBound(object sender, GridItemEventArgs e) 
    {       
    if (e.Item is GridHeaderItem) 
        { 
            GridHeaderItem headerItem = (GridHeaderItem)e.Item; 
            CheckBox check = headerItem.FindControl("CheckBoxControlID"); 
            check.Checked = true
 
        } 
    } 

Thanks
Princy.
Tags
Grid
Asked by
pankaj
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or