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

[Solved] Bound 2 properties

1 Answer 33 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.
Patric Svensson
Top achievements
Rank 1
Patric Svensson asked on 12 Jan 2011, 03:51 PM
Hi, I need to bound 2 properties (ID and Name) to the same column. How can I do that? I want to display the objects name, and add the objects ID to the link (see sample below)

columns.Bound(o => o.ID, o.Name).Format("<a href='http://www.mydomain.com/product/{0}' target='_blank'>{1}</a>").Title("Produkt").Encoded(false);

BR
Patric

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 12 Jan 2011, 04:15 PM
Hi Patric,

I'm afraid that bound columns can only be bound to a single property. Therefore in order to achieve the requested functionality, you should use ClientTemplates instead and construct the required markup. Please refer to this online demo for more details on ClientTemplates feature.

Regards,
Rosen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Patric Svensson
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or