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:
And in content page I link the grid and the tabstrip together:
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
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