Ok, I figured out myself..
Could you please tell if this is ok or if there is a more efficient way of ..?!
private void grid_ControlAdded(object sender, ControlEventArgs e)
{
String colName = grid.Cols[grid.CurCell.ColIndex].Key;
if( e.Control is TextBox)
{
CtrlUtil.removeAllKeyPressEvents((TextBox)e.Control);
}
if (colName == "GRUPPE")
{
e.Control.KeyPress += CtrlUtil.txtBox_onlyGroups;
TextB
}
}
Edit: But if I set the MaxLength Property of the TextBox it is ignored! Why?
Edited by user
2020-05-05T11:02:40Z
|
Reason: Not specified