Search This Blog

Thursday, March 14, 2013

How to limit the text length in RadGridView cell




void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
if (e.ColumnIndex == 1)
{
if (e.Column is GridViewTextBoxColumn)
{
((RadTextBoxEditorElement)((RadTextBoxEditor)this.radGridView1.ActiveEditor).EditorElement).MaxLength = 100;
}
}
}