In the datagrid control, group and enableVirtualization cannot be used together.

In the datagrid control, group and enableVirtualization cannot be used together. When enableVirtualization is false, the datagrid is displayed normally, but when enableVirtualization is true, the datagrid is empty. I want to use enableVirtualization in the group grid table, because the amount of data is relatively large, more than 10,000 rows


Attachment: Grid_9ba2ad54.zip

1 Reply 1 reply marked as answer

RS Rajapandiyan Settu Syncfusion Team May 11, 2022 11:42 AM UTC

Hi Bingxueyinlian,


Thanks for contacting Syncfusion support.


We found that you forgot to inject the VirtualScroll module in your component by analyzing your code example. This is the cause of the reported problem.


To use virtualization, you need to inject VirtualScroll module in the provide section.


Row virtualization allows you to load and render rows only in content viewport. It is an alternative way of paging in which the data will load while scrolling vertically. To setup the row virtualization, you need to define enableVirtualization as true and content height by height property.


 

[App.vue]

 

<template>

  <div class="col-lg-12 control-section">

    <div>

      <div class="control-section">

        <ejs-grid

          ref="grid"

          :dataSource="data"

          :enableVirtualization="true"

          :allowGrouping='true'

          :allowSorting='false'

          :groupSettings='groupOptions'

          :pageSettings='pageOptions'

          height='500'

        >

        </ejs-grid>

      </div>

    </div>

  </div>

</template>

<script>

import Vue from 'vue';

import { GridPlugin, Group, Page, Sort, VirtualScroll } from '@syncfusion/ej2-vue-grids';

 

Vue.use(GridPlugin);

 

export default Vue.extend({

  data: function () {

    return {

      data: data,

    };

  },

  provide: {

    grid: [VirtualScroll, Group, Page, Sort],

  },

});

</script>

 


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/vue_grid_virtualscroll1462064029.zip


Please get back to us if you need further assistance with this.


Regards,

Rajapandiyan S


Marked as answer
Loader.
Up arrow icon