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

Grid auto-bind="false" issue

9 Answers 71 Views
This is a migrated thread and some comments may be shown as answers.
Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
Wayne Hiller asked on 08 Jan 2019, 04:22 PM

I am saving a grid's column layout to localStorage in a beforeunload event. In the Vue mounted event I restore the column layout (once). To do this I have the grid's auto-bind set to false.

const opts = this.$refs.indexGrid.kendoWidget().getOptions();

-- set the column widths in opts.

this.$refs.indexGrid.kendoWidget().setOptions(opts);

After restoring the columns I call the data source read method to load the data (this.$refs.ds.kendoWidget().read()) but nothing happens. 

Does it have to do with the call to setOptions as options contains dataSource info.

 

9 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 10 Jan 2019, 11:55 AM
Hi Wayne,

If the grid is using the this.$refs.ds.kendoWidget() it should display the corresponding data. However, if the grid has its own dataSource it is expected that nothing happens after calling the read method of an another dataSource.

Could you please call the read method of the dataSource through the grid as follows and let me know if the grid displays the correct data?

this.$refs.indexGrid.kendoWidget().dataSource.read();


Regards,
Georgi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
answered on 10 Jan 2019, 02:07 PM

I tried that, same result. I ended up reassigning the datasource.

const g = this.$refs.indexGrid.kendoWidget();
const ds = this.$refs.ds.kendoWidget();
let sort = null;
 
....
 
g.setDataSource(ds);
if (sort) {
     ds.sort(sort);
}
else {
     ds.read();
}

 

0
Georgi
Telerik team
answered on 14 Jan 2019, 07:28 AM
Hello Wayne,

The described behavior might occur in case the options you are setting do not have a dataSource configuration. If opts.dataSource is a reference to the this.$refs.ds, then assigning the dataSource explicitly will not be necessary.

e.g.

opts.dataSource = this.$refs.ds.kendoWidget();
this.$refs.indexGrid.kendoWidget().setOptions(opts);


Regards,
Georgi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
answered on 14 Jan 2019, 02:08 PM
What is a bit strange is that opts.dataSource does contain a reference to this.$refs.ds. 
0
Georgi
Telerik team
answered on 15 Jan 2019, 02:12 PM
Hello Wayne,

Indeed if the opts.dataSource is a reference to the actual dataSource, the dataSource should be applied.

Having said that, sharing a demo that clearly replicates the issue would definitely help us fully understand the case and we will be able to provide further assistance to the best of our knowledge.


Regards,
Georgi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
answered on 15 Jan 2019, 03:34 PM

It is working as I have it so I am not going to worry about it much. Besides I read this today from the Telerik Dev Blogs:

The biggest thing for our Vue.js components is the new native data grid that will drop with R1 2019. This is a component that is not based on our jQuery Grid and should have a natural fit in to any Vue.js app. There’s of course a slew of other features, but for details on those (and access to the native data grid) you’ll have to wait until the official release. 

 

I will probably give the new Grid a try.

 

0
Georgi
Telerik team
answered on 17 Jan 2019, 09:03 AM
Hello Wayne,

Indeed our latest 2019 R1 release includes a native Vue Grid. You can test it in the link below:



Regards,
Georgi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
answered on 17 Jan 2019, 02:19 PM
Very interesting, I like it.  I know this is a sales/marketing question but I will ask anyway. Are there plans to eventually move all the Vue components to Native Vue? As much as I like jQuery, mixing it with Vue just feels wrong.
0
Georgi
Telerik team
answered on 21 Jan 2019, 08:44 AM
Hi Wayne,

Currently we are focusing on the grid as it is the most popular widget. Based on the traction we will consider implementing the rest of the widgets.

You can find our roadmap in the following link:


Finally, I can suggest you to vote for the native Vue components in our feedback portal:




Regards,
Georgi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Asked by
Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
Answers by
Georgi
Telerik team
Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
Share this question
or