Updating a TabStrip from a RadGrid

3 posts, 0 answers
  1. Ulrich
    Ulrich avatar
    23 posts
    Member since:
    Dec 2008

    Posted 22 Apr 2010 Link to this post

    Hello,

    I have the following scenario (dynamically created during runtime):

    A RadGrid
    A RadTabStrip

    Depending on the sort column and type of the radgrid, the radtabstrip shows different tabs like (for a string column):

    "Show all"
    "A-C"
    "D-F"
    etc.

    When clicking on one of the tabs, the database call is adjusted so only the corresponding sets are returned.

    I added an RadAjaxManager, adding the following settings during runtime (this.ContentAwarePager is a class overloading the RadTabStrip):

                       
                        if (this.ContentAwarePager != null) 
                        { 
                            AjaxUpdatedControl ucgrid = new AjaxUpdatedControl(); 
                            ucgrid.ControlID = this.ID; 
     
                            AjaxUpdatedControl ucpager = new AjaxUpdatedControl(); 
                            ucpager.ControlID = (this.ContentAwarePager as WebControl).ID; 
     
                            AjaxSetting gridtopager = new AjaxSetting(); 
                            gridtopager.AjaxControlID = this.ID; 
                            gridtopager.UpdatedControls.Add(ucgrid); 
                            gridtopager.UpdatedControls.Add(ucpager); 
     
                            ram.AjaxSettings.Add(gridtopager); 
     
                            AjaxSetting pagertogrid = new AjaxSetting(); 
                            gridtopager.AjaxControlID = (this.ContentAwarePager as WebControl).ID; 
                            gridtopager.UpdatedControls.Add(ucgrid); 
                            gridtopager.UpdatedControls.Add(ucpager); 
     
                            ram.AjaxSettings.Add(pagertogrid); 
                        } 

    Furthermore, I have a listener on TabClicked, which rebinds the datagrid.

    When I click on a tab, everything works fine, and the ajaxmanager correctly handles the updating of the grid.

    But when I catch the sort event, and remove and add tabs to the TabStrip (depending on the type of the column), the RadTabStrip is not "redrawn", if you know what I mean.

    Is there a possibility to achieve this behaviour through the RadAjaxManager?

    best regards for your help

    Ulrik
  2. Yana
    Admin
    Yana avatar
    5043 posts

    Posted 23 Apr 2010 Link to this post

    Hello Ulrich,

    You should also add an ajax setting which allows the web control which inherits RadTabStrip to update itself.


    Best wishes,
    Yana
    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.
  3. Ulrich
    Ulrich avatar
    23 posts
    Member since:
    Dec 2008

    Posted 24 Apr 2010 Link to this post

    Hello Yana,

    that solved the problem! Thank you very much :)

    best regards

    Ulrik
Back to Top