Change column size on device rotation

Hi

I'm following your getting started guide for the Data Grid.

When the app is run and the phone is portrait, the columns are slightly wider than the phone so I have to scroll to see them all. This is fine.

When I turn the phone sideways into landscape, the column widths are not re-calculated. 

Is there any way to achieve this? I'd like it to behave like a grid where I can specify Auto, * and fixed width

1 Reply

AN Ashok N Syncfusion Team December 1, 2017 08:36 AM UTC

Hi Steve, 

Thanks for contacting Syncfusion support. 

Query regarding Star and Auto Column width: 

You can achieve your requirement by setting SfDataGrid.ColumnSizer as Star. Star column sizer will adjusted all the GridColumns width an equal column width to fit within the view. Also you can set the Column width is Auto by setting ColumnSizer as Auto. Auto will adjusted all the GridColumns width based on the header text or cell contents. Please refer the below UG link for more details: 


Query regarding Fix column width: 

You can able to set the Column Width manually by using  GridColumn.Width propery. 


Regards, 
Ashok 


Loader.
Up arrow icon