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

How can I get more than one data field into a column?

2 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rod
Top achievements
Rank 1
Rod asked on 25 Mar 2013, 08:26 PM
In the examples I've found, related to the RadGridView control, when it comes to columns they use the GridViewDataColumn, which appears to me to bind to just one data element from the collection the grid view is bound to. I'd like to bind to 3 data elements in one column with the RadGridView. Specifically, I'd like to bind to the client's last name, first name and generation. (e.g.: "Smith, John" or "Smith Jr., John"). And then the column's header will simply say, "Client's Name". How do I do that?

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 26 Mar 2013, 07:21 AM
Hi,

 You can specify your own CellTemplate for desired column where you can declare any number of TextBlocks or other components bound to nay number of properties. 

Please check our demos for more info!

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Rod
Top achievements
Rank 1
answered on 26 Mar 2013, 05:25 PM
CellTemplate did the trick, thanks, Vlad.
Tags
GridView
Asked by
Rod
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Rod
Top achievements
Rank 1
Share this question
or