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

RadAjaxManager trigger a sub?

3 Answers 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dimitrios
Top achievements
Rank 1
Dimitrios asked on 05 Jun 2015, 06:49 AM

Hello all,

 Maybe it doesn't sound very likely, but there must be a way to do this.

GridA is a list of all the purchase orders.

GridB is a list of the ordered items included in the selected order of GridA.

An edit form (WebUserControl) of GridB opens the details of the selected item of GridB.

Besides the normal Update/Cancel buttons inside the edit form, there is also a custom button, which creates a new order with the remaining quantity (not received yet) of this specific ordered item. After the custom button click does all the necessary steps, it closes the edit form with <editedItem.OwnerTableView.ClearEditItems()>

When the edit form is closed, a sub in the main aspx page must be executed, which updates the main grid (GridA) and selects the order which was just created. The selection, triggers the SelectedIndexChanged sub which, as stated above, binds the GridB to the items ordered by this new order.

 So, how possible is it to use the RadAjaxManager to trigger this sub, when the edit form is closed?

If not possible, is there another approach to get this behaviour?

 

Thanks

 

 

 

 

In this same edit form, the regular update/cancel buttons also exist and they work fine.

 

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 09 Jun 2015, 01:39 PM
Hello Dimitrios,

You can invoke a manual ajaxRequest when the close button is clicked similar to the online demo below:

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid

Regards,
Maria Ilieva
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Dimitrios
Top achievements
Rank 1
answered on 10 Jun 2015, 07:18 AM

Hello Maria,

 

Sorry to say, but you are ...miles away from what I am trying to do.

There is no "close button" in my request above. The demo you directed me does not show how can I trigger another procedure on the main page (to update another grid)

There is a WebUserControl (grid edit form) , which includes a custom button. The custom button executes some custom code and then closes the WebUserControl.  I do not want to redesign another form (as the demo shows) and most definitely I don't want to rewrite the 550 lines of code in that form!

Anyways, there is no sense of writing again the problem. Please read my request above and then try to address it!!

Thanks

 

0
Maria Ilieva
Telerik team
answered on 15 Jun 2015, 08:36 AM
Hello Dimitrios,

As the described scenario is rather complex it will be difficult to directly suggest proper Ajax settings without having  the exact code. therefore I would kindly ask you to provide your page (content page/user controls) markup as well as the related code behind , so based on the exact code i can suggest you to proper Ajax settings in your case.

Regards,
Maria Ilieva
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Dimitrios
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Dimitrios
Top achievements
Rank 1
Share this question
or