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

How to prevent grid from fetching data after grid.setOptions

7 Answers 505 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kudryk
Top achievements
Rank 1
Kudryk asked on 16 Mar 2015, 08:31 AM
Hello.
Please advise if it is possible to prevent grid from fetching data again after setOptions method was called.

7 Answers, 1 is accepted

Sort by
0
Kudryk
Top achievements
Rank 1
answered on 16 Mar 2015, 12:43 PM
I will try to create grid using saved options.
0
Dimo
Telerik team
answered on 18 Mar 2015, 07:11 AM
Hello Kudryk,

setOptions() causes the Grid to re-initialize. If the widget is configured with Ajax data-binding, it will surely request its data once again. If it is configured with local data, no request will be made, because the data items are part of the Grid configuration.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Kudryk
Top achievements
Rank 1
answered on 29 May 2015, 08:32 AM
Please answer why setOptions() causes the Grid to fetch data even if autoSync is set to false in the dataSource ?
0
Kudryk
Top achievements
Rank 1
answered on 29 May 2015, 08:33 AM
Is it possible to modify grid data Source before save settings to not fetch data after restore ?
0
Accepted
Dimo
Telerik team
answered on 02 Jun 2015, 07:44 AM
Hello Kudryk,

I have provided some guidelines in the support ticket that you have posted. Please avoid opening duplicate forum threads and support tickets on the same topic, thanks.

In case you need further assistance, please continue the discussion in one of the threads only.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
John
Top achievements
Rank 1
answered on 28 Mar 2016, 01:18 PM
Hi Dimo.  You mention that you posted information in a support ticket for this issue.  Can you also post them here?  I have the same issue.  Every time grid.setOptions is called I get duplicate calls to an Ajax REST service to retrieve the data.  This is problematic when you have hundreds of users, and I'd like to avoid the extra call.  I appreciate any help or guidance on this. Thanks.
0
Dimo
Telerik team
answered on 28 Mar 2016, 01:58 PM
Hi John,

Based on the code snippet provided by Kudryk, I suggested him to set autoBind to false. This will prevent the Grid from requesting data initially, before its proper state has been applied.

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-autoBind

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Kudryk
Top achievements
Rank 1
Answers by
Kudryk
Top achievements
Rank 1
Dimo
Telerik team
John
Top achievements
Rank 1
Share this question
or