Hi Chris,
Thanks for contacting Syncfusion support.
You can set maximum length for the GridTextColumn by creating a custom renderer as shown in the following code example.
Code example :
|
public Form1()
{
InitializeComponent();
sfDataGrid1.DataSource = new OrderInfoCollection().OrdersListDetails;
this.sfDataGrid1.CellRenderers["TextBox"] = new GridTextBoxCellRendererExt();
}
public class GridTextBoxCellRendererExt : GridTextBoxCellRenderer
{
protected override void OnInitializeEditElement(DataColumnBase column, RowColumnIndex rowColumnIndex, TextBox uiElement)
{
base.OnInitializeEditElement(column, rowColumnIndex, uiElement);
uiElement.MaxLength = 5;
}
}
|
Please let us know if you require any other assistance from us.
Regards,
Mohanram A.