This is a migrated thread and some comments may be shown as answers.
Grid does not refresh after rebind Chrome
8 Answers 13 Views
This is a migrated thread and some comments may be shown as answers.
Marcel
Top achievements
Rank 1
Marcel asked on 26 Jul 2018, 06:35 PM

Hello,

I have an old style ASP .NET AJAX SharePoint web part with a user control that has a grid on it. I have a Search button which, when clicked, posts back to the server and populates the grid with search results based on search text. In IE11 everything works fine. In Chrome (and Edge), the first search works, but subsequent searches do not refresh the grid. In debug mode, I see the server code works correctly to retrieve the data, data bind and rebind the results, but those results never get back to the client and the grid is not refreshed. I repeat - everything works correctly in IE.

I also noticed that on the second search, when the server is finished, none of the client side JavaScript is executed - e.g. I added an alert which is never executed.

I need some guidance on how to identify the problem, or if this is a known issue.

Chrome: Version 67.0.3396.99 (Official Build) (64-bit)

IE: 11.165.17134.0 Update version: 11.0.75

Telerik: v4.0_2017.3.913

Thank you

8 Answers, 1 is accepted

Sort by
0
Marcel
Top achievements
Rank 1
answered on 27 Jul 2018, 07:06 PM
I have narrowed it down to the radAjaxPanel - removing it resolves the issue. Looking further ..
0
Marcel
Top achievements
Rank 1
answered on 27 Jul 2018, 07:07 PM
I have narrowed it down to the RadAjaxPanel. Removing it resolves the issue. Looking further ...
0
Eyup
Telerik team
answered on 31 Jul 2018, 06:25 AM
Hello Marcel,

When AJAX is temporarily disabled, you can also check whether there any script errors interfering:
https://www.telerik.com/support/kb/aspnet-ajax/ajaxmanager/details/get-more-descriptive-errors-by-disabling-ajax

You can also check these resources for further information:
https://docs.telerik.com/devtools/aspnet-ajax/sharepoint/troubleshooting/sharepoint-ajax-updates
https://docs.telerik.com/devtools/aspnet-ajax/sharepoint/2013/installation-and-deployment/create-an-ajax-enabled-sharepoint-webpart-with-telerik-controls
https://docs.telerik.com/devtools/aspnet-ajax/sharepoint/2007/create-an-ajax-enabled-sharepoint-webpart-that-uses-the-telerik-controls

I hope this will prove helpful.

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Marcel
Top achievements
Rank 1
answered on 31 Jul 2018, 08:56 PM

Hello Eyup,

Thanks for the links. I disabled AJAX temporarily as you suggested, but no errors occurred in the debugger, and the code worked as expected except for the loading panel, which requires ajax. I will look at the other links and report back if I solve it.

Thank you.

0
Eyup
Telerik team
answered on 01 Aug 2018, 05:03 AM
Hello Marcel,

Please take your time to troubleshoot the project and feel free to keep us updated.

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Marcel
Top achievements
Rank 1
answered on 03 Aug 2018, 10:08 PM

Eyup,

I have simplified my code by removing all my javascript. I now have a SharePoint webpart that adds a radAjaxPanel via code, and I add a user control to the radAjaxPanel. I have also added a RadAjaxManager and AjaxSettings via code.

01.protected override void OnInit(EventArgs e)
02. {
03.     base.OnInit(e);
04.     this.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Left;
05.     _radAjaxLoadingPanel = new RadAjaxLoadingPanel();
06.     _radAjaxLoadingPanel.ID = "RadAjaxLoadingPanel1";
07.     _radAjaxLoadingPanel.Skin = "Windows7";
08.     _radAjaxLoadingPanel.MinDisplayTime = 500;
09.     _radAjaxLoadingPanel.Transparency = 30;
10. 
11.     _radAjaxPanel = new RadAjaxPanel();
12.     _radAjaxPanel.ID = "RadAjaxPanel1";
13.     _radAjaxPanel.LoadingPanelID = "RadAjaxLoadingPanel1";
14.     _radAjaxPanel.EnableAJAX = false;    // freshdesk issues 5434, 4419, 4558 - chrome browser
15. 
16.     _docSearchUserControl = Page.LoadControl(_ascxPath) as DocSearchUserControl;
17.     _docSearchUserControl.ID = "DocSearchUserControl";
18.     _docSearchUserControl.ParentWebPart = this; // add reference to this web part
19. 
20.     _radAjaxPanel.Controls.Add(_docSearchUserControl);
21. 
22.     ajaxmgr = RadAjaxManager.GetCurrent(Page);
23.     if (ajaxmgr == null)
24.     {
25.         ajaxmgr = new RadAjaxManager() { ID = "RadAjaxManager1" };
26.         Page.Items.Add(typeof(RadAjaxManager), ajaxmgr);
27.     }
28. 
29.     if (Page.Form != null)
30.     {
31.         Page.Form.Controls.AddAt(0, ajaxmgr);
32.     }
33. 
34.     Controls.Add(_radAjaxLoadingPanel);
35.     Controls.Add(_radAjaxPanel);
36. 
37.     EnsureChildControls();
39. 
40. }
41. 
42. protected override void CreateChildControls()
43. {
44.     RadAjaxLoadingPanel loadingPanel = _radAjaxLoadingPanel;
45. 
46.     RadGrid grid = null;
47.     RadSearchBox searchRadSearchBox = null;
48.     RadButton button1 = null;
49.     Panel panel1 = null;
50. 
51.     if (_docSearchUserControl != null)
52.     {
53.         grid = _docSearchUserControl.FindControl("SearchResultsRadGrid") as RadGrid;
54.         searchRadSearchBox = _docSearchUserControl.FindControl("SearchRadSearchBox") as RadSearchBox;
55.         button1 = _docSearchUserControl.FindControl("Button1") as RadButton;
56.         panel1 = _docSearchUserControl.FindControl("Panel1") as Panel;
57.     }
58.     if (ajaxmgr != null)
59.     {
60.         if (searchRadSearchBox != null)
61.         {
62.             AjaxSetting ajaxSetting3 = new AjaxSetting();
63.             ajaxSetting3.AjaxControlID = button1.ID;
64.             ajaxSetting3.UpdatedControls.Add(new AjaxUpdatedControl(panel1.ID, loadingPanel.ID));
65.             ajaxmgr.AjaxSettings.Add(ajaxSetting3);
66.         }
67.     }
68. }

The user control has a single RadButton which posts back. This code works perfectly in IE, but in Chrome/Edge, it works only the first time. Subsequent clicks of the button DO post back, but do not show the loading panel. There are no errors in the debugger.  So now I have tried the loading panel with both a radajaxpanel and a radajaxmanager and both behave exactly the same. Any clues - this looks like a bug to me. What is the next step?

1.protected void Button1_Click(object sender, EventArgs e)
2.{
3.    //simulate longer load time
4.    System.Threading.Thread.Sleep(1000);
5.} 
0
Marcel
Top achievements
Rank 1
answered on 03 Aug 2018, 10:11 PM
One other thing - I have checked that the code in CreateChildControls() resolves the objects correctly on each postback.
0
Eyup
Telerik team
answered on 08 Aug 2018, 07:58 AM
Hi Marcel,

Please try replacing the RadAjaxPanel with a standard asp:Panel and add it to the settings of the RadAjaxManager instead, as demonstrated in the provided links in my previous reply.

If the issue remains, please open a formal support ticket and send us a runnable isolated version of your project so we can debug it locally.

Regards,
Eyup
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Marcel
Top achievements
Rank 1
Answers by
Marcel
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or