I have a User Control MainPage.aspx. Based on the tab clicked, it adds another control Page1.cs.Based on WorkFlow state, this adds another control Page2.cs. Page2 has 5 controls out of which 2 are radgrids. Page 2 has an Update panel, where all the 5 controls are added. Since this is the page with the 2 radgrids which need to be ajaxified, I have added a RadAjaxManager here:
Now Page2 to add the 1st grid, calls another class Inner1.cs, which based on certain conditions, calls Inner2 whcih again calls Inner3.cs which has the RadGrid. Here the RadGrid is simply added as this.Controls.Add(this._RadGrid1); No panels or update Panels here. Inner2 adds Inner3 in a Panel. I have added the RadAjaxManagerProxy to Inner1 as follows:
A similar approach to add the second radGrid in the page is used. Page2.cs invokes Inner11.cs and adds it in an Update Panel. Inner11.cs has the AjaxManagerProxy as follows:
Inner22.cs has the RadGrid. No panel or Update Panel here also.
These grids only allow delete, refresh and sort. Delete works good. But Refresh and Sort do not work.Both of them give the javascript error: Uncaught TypeError: Cannot set property 'control' of undefined.
Earlier, without the RadAjaxManagerProxy, I had both the grids with their own RadAjaxManager. Refresh worked but sort did not work. It would sort a column one way but on 2nd click sort the next column! Hence after research I used the proxy which seems the right approach but not working for me!
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
RadAjaxManager manager = new RadAjaxManager();
manager = RadAjaxManager.GetCurrent(Page);
manager.ID = "RadAjaxManager1";
manager.AjaxSettings.AddAjaxSetting(_RadGridCtrl1, _UpdatePanel);
manager.AjaxSettings.AddAjaxSetting(_RadGridCtrl2, _UpdatePanel);
}
Now Page2 to add the 1st grid, calls another class Inner1.cs, which based on certain conditions, calls Inner2 whcih again calls Inner3.cs which has the RadGrid. Here the RadGrid is simply added as this.Controls.Add(this._RadGrid1); No panels or update Panels here. Inner2 adds Inner3 in a Panel. I have added the RadAjaxManagerProxy to Inner1 as follows:
protected override void OnPreRender(EventArgs e
{
base.OnPreRender(e);
radProxy.ID = "RadAjaxManagerProxy2";
radProxy.AjaxSettings.AddAjaxSetting(this._Inner2, _FsMain);
}
A similar approach to add the second radGrid in the page is used. Page2.cs invokes Inner11.cs and adds it in an Update Panel. Inner11.cs has the AjaxManagerProxy as follows:
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
radProxy.ID = "RadAjaxManagerProxy1";
radProxy.AjaxSettings.AddAjaxSetting(this._Inner22, _FsMain);
}
These grids only allow delete, refresh and sort. Delete works good. But Refresh and Sort do not work.Both of them give the javascript error: Uncaught TypeError: Cannot set property 'control' of undefined.
Earlier, without the RadAjaxManagerProxy, I had both the grids with their own RadAjaxManager. Refresh worked but sort did not work. It would sort a column one way but on 2nd click sort the next column! Hence after research I used the proxy which seems the right approach but not working for me!