Grid resize after ColumnChooser remove columns

Hi - I am trying to smoothen the layout, when the user chooses to hide some of the columns, by the ColumnChooser toolbar. 
My ProductData has up to 22 colunms, but if the user only choose 3, the grid keeps its width, so the user stille has to scroll. 

I have set <EjsGrid Height="auto" Width="auto"  AllowResizing="true" ... 
but how do I make the grid Width fit to choosen columns? 

       

3 Replies

RS Renjith Singh Rajendran Syncfusion Team February 18, 2020 07:30 AM UTC

Hi Soren, 

Thanks for contacting Syncfusion support. 

When the Width for Grid is set as auto then the browser scroller will only be rendered as grid extends to render its columns. So, are you referring whether having minimum grid columns still showing browser scroll bar? (if so, this overflow will be based on the width provided for the Grid column) 

And also we need more details to further proceed on this and provide you a solution as early as possible. 

  1. Share with us the complete Grid code. We need to check the GridColumn’s Width configurations.
  2. Please share with us the video demo or screenshot showing the rendered Grid and the problem you are facing when having 3 column in Grid.
  3. And also, please share with us the pictorial representation of the expected Grid, after choosing 3 columns.

The provided information will help us analyze the problem, and provide you a solution as early as possible. 

Regards, 
Renjith Singh Rajendran. 



SM Soren M February 26, 2020 12:56 PM UTC

Example: The Example for Virtual Scrolling in Blazor DataGrid Component.

I have added the ColumnChooser as: 
   <EjsGrid DataSource="@GridData" ShowColumnChooser="true" Toolbar="@(new List<string>() { "ColumnChooser" })"
                     Height="410" Width="auto" EnableVirtualization="true" EnableColumnVirtualization="true">

And when I then sort in columns and just want to see Column "Playername", "Year", "Stint"


the width stays with the original size, so the scrollbars stays:



Even though the 3 columns would fit the grid.

How do I make the 3 choosen columns fit the grid?


RS Renjith Singh Rajendran Syncfusion Team February 27, 2020 09:21 AM UTC

Hi Soren, 

We have confirmed this as a defect and logged a defect report for the same. Thank you for taking the time to report this issue “Problem in refreshing Grid's width after hiding columns in a Grid with EnableColumnVirtualization” and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming bi-weekly release which is expected to be rolled by the end of March, 2020.  
  
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 


Loader.
Up arrow icon