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

[Solved] Multiline grid question

3 Answers 122 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gary
Top achievements
Rank 1
Gary asked on 04 Aug 2009, 02:39 AM
I would like to create a grid that has multiple lines per entry.  There are 4 colums in the line.  Column 1 is type, column 2 is date, column 3 is a value, column 4 is a value.  I would like to add a new column 5 (short description) that will be on the second row spanning the entire grid (basically colspan=4).  Is there a simple way to do something like this besides building a complicated template?

EX.
-----------------------------------------------------------------------------
| type             |  date                 |    val 1               |  val 2          |
-----------------------------------------------------------------------------
| Drivers        | 1/2/2009           |    Cat                 |   Dog          |
-----------------------------------------------------------------------------
| My cat likes you                                                                    |
-----------------------------------------------------------------------------
| Man           | 2/2/2009           |    Fly                 |   Chimp        |
-----------------------------------------------------------------------------
| Something about a man                                                       |
-----------------------------------------------------------------------------

3 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 05 Aug 2009, 07:49 PM
I checked out a few demos and the Outlook demo has something like what you're describing (http://demos.telerik.com/aspnet-ajax/grid/examples/programming/webmail/defaultcs.aspx). Otherwise maybe you could take advantage of word wrapping or perhaps even insert an entire separate row for just the description?
0
Sebastian
Telerik team
answered on 06 Aug 2009, 06:42 AM
Hi guys,

Another option is to take advantage of the NestedViewTemplate feature and the relations that you can set between the item and its details as presented here:

http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplatedeclarativerelations/defaultcs.aspx

One more possibility is to define global item template for the grid as shown below:

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/cardview/defaultcs.aspx

which allows you to customize the layout of the grid items in a completely custom manner.

Best,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Gary
Top achievements
Rank 1
answered on 06 Aug 2009, 03:40 PM
Sebastian,

I was also looking into item number 1 on your list.  I think it would probably work best.  We do have a 1:1 relationship and it's an in-memory list, so I'm sure I can find an easy way to do it. 

I was looking at some of the other samples as well, and created a complete templitized table, but then the colums don't line up.  for now, I'm just putting it into another fields and doing a <br /> at the end.

Thanks for the followup
Tags
Grid
Asked by
Gary
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Sebastian
Telerik team
Gary
Top achievements
Rank 1
Share this question
or