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

Filtering by List<string>

3 Answers 818 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Heather
Top achievements
Rank 1
Heather asked on 21 Oct 2013, 09:11 PM
Hello, I have a kendo grid with a column that displays as List<string> using a client template:

columns.Bound(u => u.CostCentreNames)
     .ClientTemplate("#= costCentreList(data) #")
     .Filterable(true)
     .Sortable(false);
function costCentreList(item) {
var html = "";
for (var i = 0; i < item.CostCentreNames.length; i++) {
if (item.CostCentreNames[i] != 'undefined') {
html += "<div>";
html += item.CostCentreNames[i];
html += "</div>";
}
}
return html;
}

CostCentreNames is a List<string>.

Is it possible to filter based on the values of those strings?  i.e. show only rows where that column contains the value '100'. could you provide an example if so.  Thx!

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 23 Oct 2013, 02:30 PM
Hello Taylor,

The built-in filtering does not support filtering a collection field. It is possible to implement it by passing the value to the server and filtering the data before using the ToDataSourceResult method. I attached a sample project that uses a multiselect to filter the columns that contain any of the selected values.

Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Georgi
Top achievements
Rank 1
answered on 30 May 2016, 10:13 AM

Hello Daniel,

I know this is an old post, but instead of opening a new thread it's better to ask it here.

Is this feature have been implemented? Since the original request there were a lot of releases of Kendo Grid and probably you have considered this as a good feature.

 

Thanks,

Georgi

0
Daniel
Telerik team
answered on 01 Jun 2016, 07:26 AM
Hello Georgi,

I am afraid that this is still not supported and is not currently planned. I can suggest to open a feature request in our feedback portal.

Regards,
Daniel
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Heather
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Georgi
Top achievements
Rank 1
Share this question
or