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

[Solved] how to filter a column binded to a list of string?

0 Answers 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alexandre Jobin
Top achievements
Rank 1
Alexandre Jobin asked on 29 Nov 2010, 09:58 PM
hi!

my model have a property of List<string> and my grid is defined like this:

column.Bound(a => a.Roles)
    .Template(x =>
    {
        Response.Write("<ul>");
        foreach (var role in x.Roles)
        {
            Response.Write(string.Format("<li><span>{0}</span></li>", role));
        }
        Response.Write("</ul>");
    })
    .ClientTemplate(
    "<ul>" +
    "<# for (var i = 0; i < Roles.length; i++) { #>" +
    " <li><span><#= Roles[i] #></span></li> " +
    "<# } #>" +
    "</ul>"
    ).Width(100).Sortable(false).Filterable(true);

how can i use the filter on that column? because the filter is showing with empties inputs. I thought i would use the CostumBinding but it didnt work.

is there a way to filter a column that contain a collection?

thank you!

alex
Tags
Grid
Asked by
Alexandre Jobin
Top achievements
Rank 1
Share this question
or