RadTabStrip, PageView, UserControls and RadGrids

5 posts, 0 answers
  1. Chris Haas
    Chris Haas avatar
    8 posts
    Member since:
    Oct 2009

    Posted 01 Oct 2009 Link to this post

    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
  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 02 Oct 2009 Link to this post

    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.
  3. Chris Haas
    Chris Haas avatar
    8 posts
    Member since:
    Oct 2009

    Posted 02 Oct 2009 Link to this post

    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.

     

  4. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 05 Oct 2009 Link to this post

    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.
  5. TeleriikLover
    TeleriikLover avatar
    1 posts
    Member since:
    Nov 2008

    Posted 14 Feb 2011 Link to this post

    Hello
    I have the same problem could you provide more information to implement this:

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

    Thanks.


Back to Top