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

Filter textbox Option

1 Answer 54 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gourangi
Top achievements
Rank 1
Gourangi asked on 26 Aug 2010, 12:03 PM
Hi,

I am used RadGrid with filter option.

1. i have to put validation on filter box like accept only char, only numeric etc.
2. if my column is GridNumericColumn then number should be display 4321 instead of 4.321 in filter box.

Plz give the suggestion ASAP.

Regards,
Parthesh

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 26 Aug 2010, 01:21 PM
Hello Parthesh,


In order to achieve the first requirement, you can refer the following forum post. You can check for regular expression in the onkeypress event to validate the typed charactors.
Remove filtered text from the filter taxbox column

Try the following code snippet to remove the comma separator in filter textbox of GridNumericColumn.

C#:
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
 {
  if (e.Item is GridFilteringItem)
   {
     GridFilteringItem filterItem = e.Item as GridFilteringItem;
     RadNumericTextBox txtNumber = (RadNumericTextBox)filterItem["GridNumericColumn"].Controls[0]; accessing NumericTextBox in GridNumericColumn
     txtNumber.NumberFormat.GroupSeparator = "";
   }
 }


Thanks,
Princy.
Tags
Grid
Asked by
Gourangi
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or