Resize the column width while editing in a cell in WinForms GridGrouping.
Resize the column width
In order to increase the ColumnWidth while editing the cell in WinForms GridGroupingControl, the following Boolean properties should be used.
1)AutoSize – This property Indicating whether the ColumnWidth should automatically increase when the edited text does not fit into the cell and GridStyleInfo.WrapText is false. If GridStyleInfo.WrapText is true, AutoSize property will affect the cell height.
2)WrapText – This property indicating whether the text should be wrapped into next line when it does not fit into a single line.
3)AllowTextBoxAutoSize – Automatically resize the cells while typing.
C#
//To resize the ColumnWidth while editing the cell. this.gridGroupingControl1.TableDescriptor.Appearance. AnyRecordFieldCell.WrapText = false; this.gridGroupingControl1.TableDescriptor.Appearance. AnyRecordFieldCell.AutoSize = true; this.gridGroupingControl1.TableModel.Options.UseRightToLeftCompatibleTextBox = false; this.gridGroupingControl1.TableControl.AllowTextBoxAutoSize = true;
VB
'To resize the ColumnWidth while editing the cell. Me.gridGroupingControl1.TableDescriptor.Appearance. AnyRecordFieldCell.WrapText = False Me.gridGroupingControl1.TableDescriptor.Appearance. AnyRecordFieldCell.AutoSize = True Me.gridGroupingControl1.TableModel.Options.UseRightToLeftCompatibleTextBox = False Me.gridGroupingControl1.TableControl.AllowTextBoxAutoSize = True
Screenshot
Samples:
Conclusion
I hope you enjoyed learning about how to resize the column width while editing in a cell in WinForms GridGroupingControl.
You can refer to our WinForms GridGroupingControl’s feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms GridGroupingControl documentation to understand how to present and manipulate data.
For current customers, you can check out our WinForms from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WinForms GridGroupingControl and other WinForms components.
If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!