Hello everybody,
We have a project that uses several RadGrids in many ASP sites. We created the RadGrid in an seperate UserControl and this works very well. Now I have an issue from a customer that concerns the filtering.
Init / Problem:
We enable the filtering by default in our colums and that's works good too. So the user can enter a value, then hit the TAB or ENTER key and the RadGrid filters with it's values. Now in some cases the user would like to enter all of the filter values first and start the filtering by pressing the ENTER key.
I've searched a lot in your forums and found that some users had a similar problem. What I tested now is to add the folowing code (in the ItemDataBound event from the RadGrid) to prevent the execution of the filter by pressing the TAB key in the filter textbox or loosing it's focus.
Now this works also very well and the filtering start by pressing the ENTER button, but I figured out that this not solve my problem. Because when I enter a filter value in 2 or more colums only the last entered value will be filtered and sometimes the filter is cleared and the RadGrid is not filtered.
You can see this behavior in this demo project provided from "Tsventina" (Link: Filtering on ENTER key). Please notice that we use the last release of the Telerik Controls but the behavior is the same.
You can see the problem by testing as follows:
1. Enter value in column "ContactName" and press ENTER -> Result: RadGrid is filtered OK
2. Enter value in column "ContactName" and press TAB and then ENTER -> Result: Value in column is cleared, RadGrid is not filtered
3. Enter value in column "ContactName" go to for e.g. column "Address" and enter a second filter value and press ENTER -> Result: Value in column "ContactName" is cleared, value in column "Address" is filtered.
4. Enter value in column "ContactName" go to for e.g. column "Address" and enter a second filter value and press TAB (you're possibly in column "City") and then press ENTER -> Result: All filter values are gone, RadGrid is not filtered
I hope you're understand what I'd like to say and it would be very nice if someone of you have a workarround for me.
Thanks in advance.
Best greetings from Switzerland
Reto
PS: Maybe...sorry for my bad english :)
We have a project that uses several RadGrids in many ASP sites. We created the RadGrid in an seperate UserControl and this works very well. Now I have an issue from a customer that concerns the filtering.
Init / Problem:
We enable the filtering by default in our colums and that's works good too. So the user can enter a value, then hit the TAB or ENTER key and the RadGrid filters with it's values. Now in some cases the user would like to enter all of the filter values first and start the filtering by pressing the ENTER key.
I've searched a lot in your forums and found that some users had a similar problem. What I tested now is to add the folowing code (in the ItemDataBound event from the RadGrid) to prevent the execution of the filter by pressing the TAB key in the filter textbox or loosing it's focus.
filterBox.Attributes.Add(
"OnChange"
,
"javascript:return false;"
)
Now this works also very well and the filtering start by pressing the ENTER button, but I figured out that this not solve my problem. Because when I enter a filter value in 2 or more colums only the last entered value will be filtered and sometimes the filter is cleared and the RadGrid is not filtered.
You can see this behavior in this demo project provided from "Tsventina" (Link: Filtering on ENTER key). Please notice that we use the last release of the Telerik Controls but the behavior is the same.
You can see the problem by testing as follows:
1. Enter value in column "ContactName" and press ENTER -> Result: RadGrid is filtered OK
2. Enter value in column "ContactName" and press TAB and then ENTER -> Result: Value in column is cleared, RadGrid is not filtered
3. Enter value in column "ContactName" go to for e.g. column "Address" and enter a second filter value and press ENTER -> Result: Value in column "ContactName" is cleared, value in column "Address" is filtered.
4. Enter value in column "ContactName" go to for e.g. column "Address" and enter a second filter value and press TAB (you're possibly in column "City") and then press ENTER -> Result: All filter values are gone, RadGrid is not filtered
I hope you're understand what I'd like to say and it would be very nice if someone of you have a workarround for me.
Thanks in advance.
Best greetings from Switzerland
Reto
PS: Maybe...sorry for my bad english :)