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

RadTabStrip, PageView, UserControls and RadGrids

4 Answers 98 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Chris Haas
Top achievements
Rank 1
Chris Haas asked on 02 Oct 2009, 12:35 AM
Hello,

I have what is most likely a common scenario and I'm sure there's a solution lingering in these forums that I can't find.  I have a RadTabStrip and corresponding RadPageViews.  The content of each PageView is a UserControl on which is a RadGrid.  Each RadGrid has a RadToolBar within the CommandItemTemplate.  Here's my use case.  On tab A, user selects a bunch of rows on the grid and clicks the toolbar button "Move to Trash".  This in turn removes these items from the RadGrid on tab A and moves them into the RadGrid on tab B.  I would like to use the RadAjaxManager and specify that the grid on Tab A should update the grid on Tab B.  Given that these controls are logically seperated using UserControls, the RadAjaxManager does not see the other grid as an updatable control.

It's extremely important that these grids remain on seperate user controls so their corresponding code is logically seperated from each other.  I also do not want to update the entire TabStrip as that will cause huge performance issues.  Is there a solution to this?

Thanks,
Chris

4 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 02 Oct 2009, 08:43 AM
Hi Chris,

Thank you for the detailed explanation. For your specific configuration you may consider adding RadAjaxManager settings programmatically as presented on the online demo linked below:

http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/dynamicajaxsettings/defaultcs.aspx

Additionally, you may be interested in examining the help articles under the Description tab of the example which elaborate in details on how to define ajax settings at runtime in different scenarios.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Chris Haas
Top achievements
Rank 1
answered on 02 Oct 2009, 08:35 PM
Thank you very much for the quick reply!  That online demo was exactly what I needed.  I have one follow up question though.  Is it possible to add an Ajax Setting for a specific RadToolBarButton?  My RadToolBar consists of a few buttons ("Remove", "Submit", etc.) and the Remove button is the only action that needs to update other controls on seperate tabs.  Using the code below, I'm able to specificy that the RadToolBar should update a RadGrid on a seperate UserControl:

radAjaxManager.AjaxSettings.AddAjaxSetting(radToolBar, trashBin.FindControl(

"radGrid"));

What would be great (but doesn't seem to work) is to specify which specific button updates the Grid on the other UserControl like so:

 

radAjaxManager.AjaxSettings.AddAjaxSetting(radToolBar.Items[1], trashBin.FindControl(

"radGrid"));

I'd like to avoid the overhead of updating the other Grid when any toolbar button is clicked.  Any input on this would be greatly appreciated.

Thanks.

 

0
Sebastian
Telerik team
answered on 05 Oct 2009, 10:09 AM
Hello Chris,

You can specify only entire controls as initiators of an ajax request and not parts of them (as in this case with the RadToolBar button).

You should either set the RadToolBar control as a trigger of the async request or remove the toolbar from the ajax manager setting and use the client API of the manager (and its ajaxRequest(args) method in particular) to start an ajax request from the client when the 'Remove' button is clicked.

Kind regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
TeleriikLover
Top achievements
Rank 1
answered on 14 Feb 2011, 09:03 AM
Hello
I have the same problem could you provide more information to implement this:

radAjaxManager.AjaxSettings.AddAjaxSetting(radToolBar.Items[1], trashBin.FindControl("radGrid"));

Thanks.


Tags
Ajax
Asked by
Chris Haas
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Chris Haas
Top achievements
Rank 1
TeleriikLover
Top achievements
Rank 1
Share this question
or