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

[Solved] Filtering by template column

2 Answers 91 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.
m.wujec
Top achievements
Rank 1
m.wujec asked on 15 Nov 2011, 11:48 AM
Is it possible to filter grid by template column?
If yes, please, provide some sample code.

2 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 17 Nov 2011, 02:28 PM
Hi Lukekozak.,

The filtering functionality is available only for bound columns. A possible workaround is to bound the column to some property and set its template instead of creating template column.
e.g.

@{ Html.Telerik().Grid(Model)
        .Name("Grid")
        .Columns(columns =>
        {
            columns.Bound(o=> o.PropertyForSearch).Template (
                @<text>
                   //...
                </text>
            )
...

I hope this helps.

All the best,
Pesho
the Telerik team
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
m.wujec
Top achievements
Rank 1
answered on 17 Nov 2011, 03:46 PM
Thank you.
Tags
Grid
Asked by
m.wujec
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
m.wujec
Top achievements
Rank 1
Share this question
or