We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Save Grid and Columns properties

Thread ID:

Created:

Updated:

Platform:

Replies:

144799 May 23,2019 10:38 AM UTC May 24,2019 12:15 PM UTC Vue 3
loading
Tags: Data Grid
Abdelali Mounsif
Asked On May 23, 2019 10:38 AM UTC

Hello,

I am trying to save kind of a layout of my actual data table, which will include the both grid and columns properties/attrs (ex: enableFiltering, column widths, fields, etc..) without saving useless information, like the dataSource.

Previusly working with JS1 I used to access the grid instance and save my actual model (ex: "$('#gridId').ejGrid('instance').model"), how can I do a similar thing with JS2 and Vue?

Thanks

Pavithra Subramaniyam [Syncfusion]
Replied On May 24, 2019 09:58 AM UTC

Hi Abdelali,  
 
Greetings from Sycnfusion. 
 
You can get all grid and column properties by using the “grid.properties” as below. Please refer to the below code example and sample link for more information. 
 
[Vue] 
<template> 
  <div id="app"> 
    <button v-on:click="click()">Properties</button> 
     <ejs-grid ref='grid' id='grid' :dataSource="data" :allowPaging='true' :pageSettings='pageSettings' :editSettings='editSettings' :toolbar='toolbar' 
     :allowFiltering='true'> 
        <e-columns> 
         .   .   . 
        </e-columns> 
    </ejs-grid> 
  </div> 
</template> 
 
<script> 
   methods: { 
    click: function() { 
       var temp = Object.assign({},this.$refs.grid.ej2Instances.properties); 
       Vue.delete(temp, 'dataSource');                  // her we have removevd the dataSource. You can also keep only required properties  
       console.log(temp); 
    } 
        }, 
  provide: { 
 
 
 
Please get back to us if you need any further assistance on this. 
 
Regards,  
Pavithra S. 


Abdelali Mounsif
Replied On May 24, 2019 10:29 AM UTC

Thank you!

Pavithra Subramaniyam [Syncfusion]
Replied On May 24, 2019 12:15 PM UTC

Hi Abdelali,  

Thanks for your update. 

Please contact us if you need any further assistance. As always, we will be happy to assist you.  

Regards,  
Pavithra S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon