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

Update tabstrip in content page from radwindow in usercontrol

1 Answer 50 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mattias
Top achievements
Rank 1
Mattias asked on 02 Jun 2010, 10:31 AM
Hi,
I have almost exactly the same scenario as the demo:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid

But I have a Masterpage -> Contentpage -> Usercontrol

The masterpage holds a ajaxmanager, the contentpage has a tabstrip and includes the usercontrol and the usercontrol has the grid.
I open the radwindow from inside the grid, changes some values, saves and closes the radwindow and the radgrid is refreshed.
That works!

Now:
When the grid is refreshed I want to update the tabstrip in the content page, how can this be done?

I have a event in the usercontrol which holds the value that the tabstrip will show like this:
protected void radGridImprovements_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
        { 
            IList<Task> tasks = TaskService.GetImprovements(PageInfo.CurrentObject.ID, sortedColumn, Areas, Places, string.Empty, true, SearchWord, false, 0, 0, out recordCount); 
 
            OnControlRefreshed(new ImprovementRefreshEventArgs(12345)); 
 
            radGridImprovements.DataSource = tasks; 
        } 

public event ImprovementRefreshEventHandler ControlRefreshed; 
        protected virtual void OnControlRefreshed(ImprovementRefreshEventArgs e) 
        { 
            if (ControlRefreshed != null
            { 
                ControlRefreshed(this, e); 
            } 
        }   

And in content page I link the grid and the tabstrip together:
protected void Page_Load(object sender, EventArgs e) 
        { 
            RadGrid radGridImprovements = (RadGrid)ppsImprovements.FindControl("radGridImprovements"); 
            RadAjaxManagerMaster.AjaxSettings.AddAjaxSetting(radGridImprovements, radTabStripViewsLeft, null); 
        } 

protected void Improvements_ControlRefreshed(object sender, ImprovementRefreshEventArgs e) 
        { 
            radTabStripViewsLeft.Tabs[1].Text = string.Format("Förbättringar ({0})", e.RowCount); 
 
        } 


I guess I am pretty close cause if I just click a heading to sort the grid the tabstrip is updated so the event itself works and the ajax relation between the grid and the tabstrip.

The problem is that the tabstrip wont update when the radwindow is closed and the grid is refreshed.

Regards,
Mattias




1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 07 Jun 2010, 02:27 PM
Hi Mattias,

Could you please test adding the following setting in the RadAjaxManager settings and see if this will make any difference:

RadAjaxManagerMaster.AjaxSettings.AddAjaxSetting(radTabStripViewsLeft, radTabStripViewsLeft, null); 

If this does not help, please consider opening a regular support ticket and send us small runnable application which demonstrates this behavior. We will test it locally and provide more to-the-point solution.


Kind regards,
Maria Ilieva
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.
Tags
Ajax
Asked by
Mattias
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or