BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
void syncgrid_ModelLoaded(object sender, EventArgs e) { this.syncgrid.Model.HeaderStyle.TextWrapping = TextWrapping.Wrap; this.syncgrid.Model.HeaderStyle.TextTrimming = TextTrimming.None; this.syncgrid.Model.ResizeRowsToFit(GridRangeInfo.Row(0), GridResizeToFitOptions.NoShrinkSize); |
<syncfusion:GridDataControl Name="syncgrid" DefaultHeaderRowHeight="70" AutoPopulateColumns="False" ItemsSource="{Binding GDCSource}" NotifyPropertyChanges="True" ShowAddNewRow="False" |
<syncfusion:GridDataVisibleColumn Width="200" HeaderText="Name List Details - Wrapped HeaderText column" MappingName="Name"> <syncfusion:GridDataVisibleColumn.ColumnStyle> <syncfusion:GridDataColumnStyle TextWrapping="Wrap" /> </syncfusion:GridDataVisibleColumn.ColumnStyle> |
void grid_Loaded(object sender, RoutedEventArgs e) { this.grid.Model.ResizeRowsToFit(GridRangeInfo.Table(), GridResizeToFitOptions.NoShrinkSize); |
void grid_CurrentCellEditingComplete(object sender,SyncfusionRoutedEventArgs args) { this.grid.Model.ResizeRowsToFit(GridRangeInfo.Table(), GridResizeToFitOptions.NoShrinkSize); //throw new NotImplementedException(); |
Hi Ari ,
We are sorry about the inconvenience caused .
We analyzed your query . By default, in GridDataControl the text will wrapped based on the whitespace and special characters (dot(.), separator(,)). So, the input text will not be wrapped if you enter the character without whitespace in GridDataControl . You can overcome this by including appropriate input with whitespace . Here if you would like to achieve your requirement without using whitespace or special character, you can achieve the same requirement with our SfDataGrid control like GridDataControl and its having AutoRowHeight feature to achieve the same in SfDataGrid control.
But when compared to GridDataControl, SfDataGrid has a better performance and flexibility. SfDataGrid assists you to create entirely customizable and highly interactive features used to display and manipulate the huge amount of data. So, we suggest you to use SfDataGrid instead of GridDataControl. Also we have already marked GridDataControl as a classic.
Please refer the following UG link for SfDataGrid.
UG Links: http://help.syncfusion.com/ug/wpf/index.html#!Documents/choosebetweendifferentgrids.htm
http://help.syncfusion.com/ug/wpf/index.html#!Documents/overview19.htm
Also we have prepared the sample for your AutoRowHeight requirement and you can download the sample from following location,
Sample: http://www.syncfusion.com/downloads/support/directtrac/135742/ze/AutoRowHeightDemo-982551612
Please refer the below UG link for AutoRowHeight in SfDataGrid,
http://help.syncfusion.com/ug/wpf/index.html#!Documents/autorowheight.htm
Regards,
Jai Ganesh S