You are not logged in.
This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.
Pages: 1
Topic closed
Is there a way to set the maximum number of characters allowed in a text cell?
Last edited by kwebster (2016-09-08 17:52:51)
Never order the french onion soup in a Chinese restaurant.
Offline
You can use CellEditCharInputed event.
sheet.CellEditCharInputed += Sheet_CellEditCharInputed;
private void Sheet_CellEditCharInputed(object sender, CellEditCharInputEventArgs e)
{
if (!string.IsNullOrEmpty(e.InputText) && e.InputText.Length >= 5)
{
// set InputChar as Zero to cancel new input characters
e.InputChar = 0;
}
}
Last edited by Jingwood (2016-09-13 16:04:11)
Offline
Pages: 1
Topic closed