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

RadGrid Filter issue

5 Answers 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paulo
Top achievements
Rank 1
Paulo asked on 22 Jan 2014, 08:05 PM
Hi,

I have a RadGrid with some columns. One of the columns is customized and I have a RadComboBox filter where user will be able to choose one option to filter the grid. This combobox is being populated from a datasource  and some of the values have "and" or "or" as part of the string, such "Bass and Cooper" or "Car or Bus or Plane". I notice that every time I try to filter and select one of the two options the filter does "Nothing". however if the option does not contain "and" or "or" the filter works.
the function I am using is:

function OpTComboIndexChanged(sender, args) {

var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");

var ss = args.get_item().get_value();

if (ss != "Other") {

tableView.filter("Operation_Type", args.get_item().get_value(), "EqualTo");

5 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 27 Jan 2014, 11:24 AM
Hi Paulo,

I have created a sample RadGrid web site to test the described scenario. On my side the approach works as expected. Can you please run the attached application and let me know about the result?

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
0
Paulo
Top achievements
Rank 1
answered on 27 Jan 2014, 01:49 PM
I got this error...
0
Paulo
Top achievements
Rank 1
answered on 27 Jan 2014, 09:49 PM
Hi Eyup

I just notice that if I hardcode the items inside the combobox with text and value values it works. However I am populating the combobox with ObjectDataSource as I did with the other columns. All other columns the filter works fine. Just this one does not work if combobox is populated from ObjectDataSource.
0
Paulo
Top achievements
Rank 1
answered on 28 Jan 2014, 03:41 PM
Hi Eyup

I just notice that when the "and" or "or" is in uppercase the filter function does not filter. However if it is lowercase filter function works fine. Is there a way to review the filter function code?
0
Eyup
Telerik team
answered on 30 Jan 2014, 09:49 AM
Hello Paulo,

Please note that capital AND and OR are reserved, as well as, some other illegal strings which you will have to avoid - like quotes. Modifying this requirement is risky but can be achieved nevertheless:
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-filter-with-and-and-or.aspx

I hope the clarification was helpful.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Paulo
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Paulo
Top achievements
Rank 1
Share this question
or