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

Updating a TabStrip from a RadGrid

2 Answers 45 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Ulrich
Top achievements
Rank 1
Ulrich asked on 22 Apr 2010, 11:30 AM
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 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 23 Apr 2010, 02:00 PM
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.
0
Ulrich
Top achievements
Rank 1
answered on 24 Apr 2010, 08:55 AM
Hello Yana,

that solved the problem! Thank you very much :)

best regards

Ulrik
Tags
TabStrip
Asked by
Ulrich
Top achievements
Rank 1
Answers by
Yana
Telerik team
Ulrich
Top achievements
Rank 1
Share this question
or