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

Access EditForm (popup) outside an event

2 Answers 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Francois
Top achievements
Rank 1
Francois asked on 14 May 2013, 02:51 PM
Hi,

Is there a way to access te EditForm just by a reference to the grid? I'm trying to manipulate a certain control of the template, without having access to the GridCommandEventArgs of the ItemCommand event (where e.Item is the PopupForm),  when the Popup is shown (so I know the control is accessible)

I've looked into the grid.MasterTableView.Items[0].EditFormItem, but can't find any reference.

Any idea?

Thanks!

--
Frank

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 15 May 2013, 03:15 AM
Hi Francois,

I am not sure about your requirement.I guess you want to access the RadGrid from an external button click event. Please take a look into the following code snippet I tried.

C#:
protected void Button1_Click(object sender, EventArgs e)
{
    GridEditFormItem item = (GridEditFormItem)RadGrid1.MasterTableView.GetItems(GridItemType.EditFormItem)[0];
    TextBox txt = (TextBox)item["OrderID"].Controls[0]; ;
}

Thanks,
Princy.
0
Francois
Top achievements
Rank 1
answered on 21 May 2013, 12:00 PM
Thank you, it works.

I'm trying to validate my entity using the Microsoft Enterprise Library Validation block, and I mapped each property validated to a label on the popup, so I needed an access from my presenter to pass the ValidationResults collection.

Have a great day,

--
Frank
Tags
Grid
Asked by
Francois
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Francois
Top achievements
Rank 1
Share this question
or