Chris Dalessandri
Top achievements
Rank 1
Chris Dalessandri
asked on 03 Sep 2009, 03:17 PM
I have been using a slightly modified version of the technique discussed in this video to filter on enter
http://telerikwatch.com/2008/09/telerik-watch-minute-enhancing-radgrid.html
For example, this technique allows a user to type "foo*" and press enter to display only values in that column that begin with "foo".
I would like to use this same technique for GridNumericColumn so that a user could type "> 1" to display all values greater than 1. The problem is that GridNumericColumn renders a RadNumericTextBox for the filter and you cannot type ">" nor any other useful filtering character.
I am binding to reporting data and cannot know the columns ahead of time nor their datatypes.
Is there a way to force GridNumericColumn to use an asp TextBox like GridBoundColumn does? Or any other clever solution?
Thanks in advance.
Chris
http://telerikwatch.com/2008/09/telerik-watch-minute-enhancing-radgrid.html
For example, this technique allows a user to type "foo*" and press enter to display only values in that column that begin with "foo".
I would like to use this same technique for GridNumericColumn so that a user could type "> 1" to display all values greater than 1. The problem is that GridNumericColumn renders a RadNumericTextBox for the filter and you cannot type ">" nor any other useful filtering character.
I am binding to reporting data and cannot know the columns ahead of time nor their datatypes.
Is there a way to force GridNumericColumn to use an asp TextBox like GridBoundColumn does? Or any other clever solution?
Thanks in advance.
Chris
5 Answers, 1 is accepted
0
Hello Chris,
In order to take advantage of the technique presented on the video, you will need to define GridBoundColumn explicitly (to represent the numeric field in the source) and use its textbox filter control for user entry. The built-in GridNumericColumn does not allow that because of the specific value parsing of its RadNumericTextBox filter.
Best regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
In order to take advantage of the technique presented on the video, you will need to define GridBoundColumn explicitly (to represent the numeric field in the source) and use its textbox filter control for user entry. The built-in GridNumericColumn does not allow that because of the specific value parsing of its RadNumericTextBox filter.
Best regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Chris Dalessandri
Top achievements
Rank 1
answered on 03 Sep 2009, 03:43 PM
Not sure I follow. These columns are auto generated. I know nothing of how many columns I will see nor what data type they will be.
How do I tell the grid to never use GridNumericColumn?
How do I tell the grid to never use GridNumericColumn?
0
Hi Chris,
The auto-generated RadGrid columns are data type sensitive and that is why GridNumericColumns will be created for fields in the source which are of numeric type. Hence if you would like to support this type of filtering functionality, you will need to define GridBoundColumns explicitly in the grid markup or programmatically from the code behind.
Kind regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
The auto-generated RadGrid columns are data type sensitive and that is why GridNumericColumns will be created for fields in the source which are of numeric type. Hence if you would like to support this type of filtering functionality, you will need to define GridBoundColumns explicitly in the grid markup or programmatically from the code behind.
Kind regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Chris Dalessandri
Top achievements
Rank 1
answered on 03 Sep 2009, 04:26 PM
I am not confused about why this is happening.
I recently upgraded to the latest version of the controls. I was four or five versions behind.
I presume at some point in the last few versions you decided to start rendering a RadNumericTextBox instead of an asp TextBox for the filter for GridNumericColumn. That was a breaking change for me. My grid used to filter as expected on numeric columns and now it doesn't. I still have sites running the older Telerik version and I can see that the filtering works for numeric columns.
I am asking how to work around this now. Or are you telling me that I cannot use auto-generated columns anymore and expect to use this filtering technique on numeric columns?
Thanks.
Chris
I recently upgraded to the latest version of the controls. I was four or five versions behind.
I presume at some point in the last few versions you decided to start rendering a RadNumericTextBox instead of an asp TextBox for the filter for GridNumericColumn. That was a breaking change for me. My grid used to filter as expected on numeric columns and now it doesn't. I still have sites running the older Telerik version and I can see that the filtering works for numeric columns.
I am asking how to work around this now. Or are you telling me that I cannot use auto-generated columns anymore and expect to use this filtering technique on numeric columns?
Thanks.
Chris
0
Hello Chris,
The data type sensitive columns has been introduced with the first version of RadControls for ASP.NET AJAX (Q1 2008). There are no breaking changes since then (except that at a later point we modified the code to generate GridNumericColumns for decimal fields in the source in addition to integer fields) and the columns will generate textbox filters and editors in case you use the RadGrid for ASP.NET version only.
Therefore, if you intend to use the filtering presented on the video, you will need to define GridBoundColumns declaratively or programmatically as explained in my previous message. I hope this is applicable workaround for you.
Kind regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
The data type sensitive columns has been introduced with the first version of RadControls for ASP.NET AJAX (Q1 2008). There are no breaking changes since then (except that at a later point we modified the code to generate GridNumericColumns for decimal fields in the source in addition to integer fields) and the columns will generate textbox filters and editors in case you use the RadGrid for ASP.NET version only.
Therefore, if you intend to use the filtering presented on the video, you will need to define GridBoundColumns declaratively or programmatically as explained in my previous message. I hope this is applicable workaround for you.
Kind regards,
Sebastian
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.