Yes. In order to do so, you will need to subscribe to each of the columns’ editors (by default a GridTextBox) TextChanged event in order to resize when a character is added or removed to or from a cell.
As for the resizing the grid, you would need to do the following to resize it so that all the columns are displayed:
int totalColWidth = 0;
foreach( Xceed.Grid.Column col in gridControl1.Columns ) { totalColWidth = totalColWidth + col.Width; }
gridControl1.Width = totalColWidth + gridControl1.RowSelectorPane.Width + gridControl1.ClientRectangle.Width – gridControl1.DisplayRectangle.Width; |
A that demonstrates the required implementation is available for download (see attachments).
Imported from legacy forums. Posted by Xceed admin (had 1698 views)