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

combine columns

2 Answers 44 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 18 Feb 2015, 12:10 AM
here is what I need to do;

columns.Bound(x -> x.CreatedOn).Title ("Created On")
columns.Bound(x -> x.CreatedBy).Title ("Created By")

I have the 2 columns above and want to display them into 1 column. ( I have done this with other grids with the statement as follows)

columns.Bound(x => x.CreatedOn).Title ("Created ").RenderValueAs(x =>x.CreatedBy + " " + x.CreatedOn)

Can anyone help me out? 2 columns renderd as 1 value A over value B new heading?

2 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 18 Feb 2015, 09:42 AM
Hello,

You say you have achieved the same with other grids. Do you mean the MS DataGrid? Does the same approach work with it and not with RadGridView?

Generally, you can also expose a new property combining those two and use it for the DataMemberBinding or redefine the CellTemplate of the column to display what you would like to. You can also check our online documentation on defining CellTemplate/CellEditTemplate for a reference.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Tim
Top achievements
Rank 1
answered on 18 Feb 2015, 10:27 PM
http://gridmvc.codeplex.com/wikipage?title=Custom%20columns&referringTitle=Documentation

This is the grid I have used. It is very light weight and simple but does not support Pagenation.Length so I came to Telerik
Tags
GridView
Asked by
Tim
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Tim
Top achievements
Rank 1
Share this question
or