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

[Solved] grid flickers when sorting

5 Answers 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dewang Shah
Top achievements
Rank 1
Dewang Shah asked on 27 Jan 2010, 12:29 PM
Hi,

The examples on the demo website all maintain the structure of the grid, make it grayed out and show a blue circle when sorting.

As far as I can see my code is the same as the examples. The one difference is that I do not have auto-generate for the columns and I am creating the grid entirely in code-behind (in Page_Init) as I need to load the columns dynamically.

In my grid, the entire grid disappears for a second and then is re-displayed with the sorting. Is there a setting that will make it keep the original grid grayed out like the demo?

Thanks,
Dewang

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 28 Jan 2010, 09:56 AM
Hello Dewang,

To achieve the required functionality, you should set RadGrid control to update itself with an AJAX request and show RadAjaxLoadingPanel over the updated control:

Refer to the following help article, for more information:
Add AjaxSettings programmatically

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Dewang Shah
Top achievements
Rank 1
answered on 28 Jan 2010, 03:13 PM
Thanks for your reply. I am already adding the grid to the ajax manager with the following code
RadAjaxManager1.AjaxSettings.AddAjaxSetting(grid, grid, RadAjaxLoadingPanel1); 



However I still get a flicker when I sort the grid. Could there be something else that I am missing?

Thanks,
Dewang
0
Pavlina
Telerik team
answered on 29 Jan 2010, 12:18 PM
Hello Dewang,

I am afraid that the provided information is not enough to determine the exact cause of the unwanted effect. Therefore, I will ask you to send us a simple working project via a support ticket, or at least send us your page declaration. Thus we could help you further in resolving it.

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Dewang Shah
Top achievements
Rank 1
answered on 29 Jan 2010, 12:33 PM
Hi Pavlina,

I am using this in a user control, so the ASCX has the following -
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
 
 
<telerik:RadAjaxManager ID="radAjaxManager" DefaultLoadingPanelID="radAjaxLoadingPanel" runat="server"
</telerik:RadAjaxManager> 
<telerik:RadAjaxLoadingPanel ID="radAjaxLoadingPanel" runat="server"
</telerik:RadAjaxLoadingPanel> 
 
<asp:PlaceHolder ID="placeHolder" runat="server" /> 
 

In the code-behind I have a bunch of code that reads our configuration to set the grid properties and columns.
        protected void Page_Init(object sender, System.EventArgs e) 
        { 
            this.grid = new RadGrid(); 
            this.grid.AutoGenerateColumns = false
            this.grid.EnableViewState = true
            this.grid.NeedDataSource += Grid_NeedDataSource; 
             
            this.LoadGridConfiguration(gridItem); 
            this.LoadColumnConfiguration(gridItem); 
 
            this.placeHolder.Controls.Add(this.grid); 
        } 
 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            this.radAjaxManager.AjaxSettings.AddAjaxSetting(this.grid, this.grid, this.radAjaxLoadingPanel); 
 
            if (!IsPostBack) 
            { 
                this.grid.Rebind(); 
            } 
        } 
 

Please let me know if you need any further information.

Thanks,
Dewang
0
Pavlina
Telerik team
answered on 03 Feb 2010, 03:59 PM
Hello Dewang,

I followed your scenario in order to replicate the issue you are facing but to no avail. Please find attached a simple working project which is working properly. Check it out and let me know if you need additional assistance.

All the best,
Pavlina
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
Grid
Asked by
Dewang Shah
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Dewang Shah
Top achievements
Rank 1
Share this question
or