This is a migrated thread and some comments may be shown as answers.

make the user to enter only 2 character

1 Answer 37 Views
Grid
This is a migrated thread and some comments may be shown as answers.
beeta one
Top achievements
Rank 1
beeta one asked on 14 Jan 2013, 11:43 AM
How can i make the user to enter only 2 character while filtering in radgrid?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Jan 2013, 11:49 AM
Hi,

Try the following code to achieve your scenario.
C#:
protected void RadGrid2_PreRender1(object sender, EventArgs e)
{
    GridFilteringItem item = (GridFilteringItem)RadGrid2.MasterTableView.GetItems(GridItemType.FilteringItem)[0];
    TextBox txt = (TextBox)item["Uniquename"].Controls[0];
    txt.MaxLength = 2;
}

Thanks,
Shinu
Tags
Grid
Asked by
beeta one
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or