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

GetReference for radGrid into FormTemplate

2 Answers 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 01 Oct 2008, 05:26 PM
Hi,How to get reference for grid in FormTemplate for a row in editMode, outside the itemDataBound?I had a toolbar inside my FormTemplate and my command is launch with this toolbar. The reference is always nothing when i search in the EditItems.Ty

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Oct 2008, 05:21 AM
Hello Jack,

You have to refer the grid in the EditFormTemplate as GridEditFormItem and then access the it. Try out the following code snippet in the ToolbarCommand.
cs:
foreach (GridEditFormItem formItem in RadGrid1.MasterTableView.GetItems(GridItemType.EditFormItem)) 
        { 
            RadGrid grid = (RadGrid)formItem.FindControl("RadGridID");             
        } 

Thanks
Princy.
0
Jack
Top achievements
Rank 1
answered on 03 Oct 2008, 02:14 PM
Thank you very much Princy!
Tags
Grid
Asked by
Jack
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Jack
Top achievements
Rank 1
Share this question
or