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

[Solved] Grid Column Bind

1 Answer 11 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.
Ajay
Top achievements
Rank 1
Ajay asked on 21 Nov 2011, 09:58 AM
How to bind 3 values in 1 column of telerik grid?

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 22 Nov 2011, 05:13 PM
Hi Prashant ,

Generally speaking you will need to bound a column to some of the three properties and set its template.
e.g.

@(Html.Telerik().Grid<Person>()
    .Name("Persons")
    .BindTo(Model)
    .Columns(columns =>
    {
        columns.Bound(p=> p.Age)
                .Template(@<text>@string.Format("[{0}] : {1}",item.Name,item.Age)</text>)
                .Title("Composite Column");        
    })          
    .Sortable()
    .Filterable()
)


Notice that the filtering and sorting functionality will be applied according to the property you bound it (p.Age in the sample above) .


 Regards,
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
Tags
Grid
Asked by
Ajay
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or