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

Accessing items in edit form from outside the grid

1 Answer 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 22 Mar 2012, 09:59 PM
I have a panel that is located outside of my radgrid and when I click a button in the panel I want to access a control in the edit form of the grid.  Is this possible?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Mar 2012, 05:38 AM
Hello Andy,

Try the following code to access editform controls in an external button click event.
C#:
protected void Button1_Click(object sender, EventArgs e)
{
  GridEditFormItem item = (GridEditFormItem)RadGrid1.MasterTableView.GetItems(GridItemType.EditFormItem)[0];
  TextBox txt = (TextBox)item.FindControl("TextBox1");
}

Thanks,
Shinu.
Tags
Grid
Asked by
Andy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or