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

Formview + Radgrid. edit all issue

1 Answer 58 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Stacy
Top achievements
Rank 1
Stacy asked on 01 Mar 2012, 07:50 PM
I have an issue that hopefully you can help me with.  I have a search page for users.  Do a search and a user or list of users is returned.
Double click and a control is opened in a modal window.

In this control I have a formview and a radgrid:

<FormView>
    Details on the user which was selected (name, email, etc)
</FormView>
<RadGrid>
    A list of security groups in which the user can be added/removed from
</RadGrid>

Note:  two different datasources are used to populate the formview and radgrid.
           the radgrid is in "editAllMode"

My issue is when I perform an update.  The "update" button is in the formview, and triggers an event in which I can update the personal info of the user based on this method firing...."FormView_Updating".  Args are (object sender, WLPItemUpdatingEventArgs e).  I am using "e" to get the updated data for the formview.  Now after the personal data is updated (which works fine), I want to make a call to update the user's security groups by
triggering in code the RadGrid's "nameOfGrid_UpdateAllCommand(object sender, UpdateAllCommandEventArgs e)" from inside the "Formview_Updating" event.

Here is my issue. I am not sure how fire the event appropriately.  I can use "Grid.OnUpdateAllCommand"(takes 2 args, sender and UpdateAllCommandEventArgs) however I am unable to pass anything valid for the "UpdateAllCommandEventArgs" argument, which I need to see what groups have been selected for the user.  Any ideas how i can ?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Marin
Telerik team
answered on 05 Mar 2012, 02:43 PM
Hi Stacy,

 The RadGrid Ajax control by default does not have UpdateAllCommand and UpdateAllCommandEventArgs members. So I presume this is a custom event of your user control and in this case you would need to instantiate the correct event arguments and pass it to the event according to its design.

Hope this helps.

Greetings,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Stacy
Top achievements
Rank 1
Answers by
Marin
Telerik team
Share this question
or