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

RadGrid refresh via asp:Timer and v-scrollbar problem

1 Answer 98 Views
Grid
This is a migrated thread and some comments may be shown as answers.
n/a
Top achievements
Rank 1
n/a asked on 01 Feb 2019, 02:25 PM

Hi all,

 

I have a problem with a RadGrid (radgrid_alarms) on a page, where the data are reload every 2 second via an asp timer.

 

I can in the timer event => radgrid_alarms.Rebind();

The problem is about the vertical scrollbar, is flicking at every load.

 

Any suggestion to arrange this ?

 

Thanks,

 

Didier

 

More infos :

1) I have ajaxify the RadGrid

            <telerik:AjaxSetting AjaxControlID="TimerRefresh">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radgrid_alarms" UpdatePanelRenderMode="Inline"/>

2) the rad grid definition :

 

                                            <telerik:RadGrid ID="radgrid_alarms" runat="server"
                                                ShowHeader="true" AutoGenerateColumns="False" Culture="fr-FR"
                                                ResolvedRenderMode="Classic"
                                                Skin=""
                                                MasterTableView-CssClass="table table-bordered table-striped table-bootstrapinputs table-custom table-rounded"
                                                OnNeedDataSource="radgrid_alarme_NeedDataSource"
                                                OnItemDataBound="radgrid_alarme_ItemDataBound" Height="200">
                                                <ClientSettings>
                                                    <Selecting AllowRowSelect="false" />
                                                    <Scrolling AllowScroll="true" SaveScrollPosition="true"/>
                                                </ClientSettings>
                                                <MasterTableView>
                                                    <Columns>

 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 04 Feb 2019, 04:23 PM
Hello Didier,

The postback, even if it is asynchronous, re-renders the entire grid, and this takes time, especially with larger data sets or a large page size, or with many columns. The browser speed and how heavy the entire page is are also factors. A two-second interval is extremely short and such a flicker during re-render is to be expected.

What I can suggest is the following:

  • increase the interval so the user can see things
  • make sure the grid has height and scrollheight set, and make sure that its parent element that is not disposed with the postback also has matching dimensions, so it will not flicker when its contents are removed from the DOM and then re-created
  • add a loading panel that will cover the grid during the postback to reduce the visibility of the DOM update for the end user

I would also suggest that you consider using a kendo grid with client-side binding so a service endpoint is called which is usually significantly faster than a postback on a WebForm.


Regards,
Marin Bratanov
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
n/a
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or