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

CommandItem in code behind

1 Answer 25 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryann
Top achievements
Rank 1
Ryann asked on 22 Nov 2013, 12:17 PM
Hi.
 I want to access the CommandItem in code behind in the PreRender event. How to access it there?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Nov 2013, 12:22 PM
Hi Ryann,

Please try the following code snippet to access the CommandItem.

C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
 {
 GridItem cmdItemTop = RadGrid1.MasterTableView.GetItems(GridItemType.CommandItem)[0];     
}

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