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

find checkbox in the header of the radgrid

3 Answers 106 Views
Grid
This is a migrated thread and some comments may be shown as answers.
digish devassy
Top achievements
Rank 1
digish devassy asked on 05 Mar 2012, 07:54 AM
Hi,

Find checkbox in the header of the RadGrid. I am looking for c# code. I am having the button outside radgrid. I am looping through the dataitem to find other columns.

I need to find am method to find the contorl in the header.

Thanks in advance.


3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 05 Mar 2012, 08:04 AM
Hello,

Try the following code.
C#:
protected void Button1_Click(object sender, EventArgs e)
{
 foreach (GridHeaderItem item in rad2.MasterTableView.GetItems(GridItemType.Header))
 {
  CheckBox chk = (CheckBox)item.FindControl("CheckBox1");
 }
}

-Shinu.
0
digish devassy
Top achievements
Rank 1
answered on 05 Mar 2012, 09:33 AM
HI Shinu,

I had found the same answer. Thanks for coming to help.
0
Angie
Top achievements
Rank 1
answered on 08 May 2018, 07:28 PM
I need to find a checkbox in the header of the detail table of a RadGrid. But I can't to access in a HeaderItem and GridItem at the same time, I mean access to Header Item and try to find the Grid Item.  Add an image.
Tags
Grid
Asked by
digish devassy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
digish devassy
Top achievements
Rank 1
Angie
Top achievements
Rank 1
Share this question
or