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:
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
0
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
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.
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?
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
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
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.