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. Image for the cookie policy date

Hide horizontal scroll if frozencolumns are set

Hello

When we create a grid, if the columns are not wider than the grid, there is no horizontal scroll.

 however, if we freeze the first column, the scroll appears, although it is not necessary.


Is it possible to remove that scroll if it is not necessary?

Thank you.

Regards


3 Replies 1 reply marked as answer

RS Rajapandiyan Settu Syncfusion Team March 23, 2023 01:33 PM UTC

Hi Jorge,


Thanks for contacting Syncfusion support.


Query: Is it possible to remove that scroll if it is not necessary?


By executing hideScroll method in the dataBound event of Grid, we can hide the scrollbar if there is no need. Please find the below code example and the attached sample for your reference.


dataBound: https://ej2.syncfusion.com/vue/documentation/api/grid/#databound

hideScroll: https://ej2.syncfusion.com/vue/documentation/api/grid/#hidescroll


 

[App.vue]

 

  methods: {

    dataBound: function (args){

      this.$refs.grid.ej2Instances.hideScroll();

    }

  }

 


Regards,

Rajapandiyan S


Attachment: vue_grid_hidescroll_938d8f45.zip

Marked as answer

JO Jorge March 23, 2023 03:37 PM UTC

I was trying with hideScroll but I couldn't get it to work, now with the dataBound it works correctly.

Thanks for your answer.



RS Rajapandiyan Settu Syncfusion Team March 24, 2023 03:43 AM UTC

Jorge,


We are happy to hear that you have achieved your requirement with the solution provided.


Please get back to us if you need further assistance.


Regards,

Rajapandiyan S
If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Loader.
Up arrow icon