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

findcontrol - when edit form is a web user control

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Colan
Top achievements
Rank 1
Colan asked on 14 Sep 2010, 07:59 PM
From the parent page code behind file, I need an object reference for the user control edit form.

Have found a couple of hints in the documentation, but doesn't seem to work - it always returns null:

 var xxx = MyGrid.FindControl(  GridEditFormItem.EditFormUserControlID);

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 14 Sep 2010, 09:37 PM
Hello Colan,

Please post your code here so that we can examine it. In the meantime you could try the following:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item.IsInEditMode)
    {
        var userControl = e.Item.FindControl(GridEditFormItem.EditFormUserControlID);
    }
}

Regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Colan
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or