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

RadGrid UserControl Edit form How to pass eventarguments

3 Answers 133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mac P
Top achievements
Rank 1
Mac P asked on 27 Mar 2010, 05:21 PM

Please refer to this sample below
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx

As you can see that there is postback on add new button or edit button or delete button

I want to render the controls selectively and do some processing on postback generated from grid.
When i check form's eventargument or target it is null.

Is there a way i can figure out which button generated event from the grid in user control?

regards
Mac

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 01 Apr 2010, 07:13 AM
Hello Mac P,

One possible way to handle this is to attach the ItemCommand event handler of the grid. When a button in the user control edit form is pressed (for example Update), the item command event handler of the grid will be hit, giving you a chance to get a reference to all the items in the user control edit form.
I hope this is a feasible approach for you.

Kind regards,
Yavor
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.
0
Mac P
Top achievements
Rank 1
answered on 05 Apr 2010, 02:15 AM
My usercontrol always returns null.
I have grid in usercontrol that binds on search button click. When i click add or edit button of the grid and try to findcontrol another usercontrol that i have set it always returns null.

Does grid supports usercontrol reference when grid itself in contained in usercontrol?
0
Yavor
Telerik team
answered on 07 Apr 2010, 11:26 AM
Hello Mac P,

Basically, you should be able to reference the user control in such a situation.
If that is not the case, you can open a formal support ticket, and send us a small working project, demonstrating your setup. We will review it locally, and advise you further.

All the best,
Yavor
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
Mac P
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Mac P
Top achievements
Rank 1
Share this question
or