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

[Solved] Multi row record

3 Answers 110 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 14 May 2009, 01:09 PM
Hi.
Is it possible to break one data record into more then one row if the total width of all columns doesn't fit the width of the table?
But to have all features like sorting by clicking on column header, etc.

Something like this:

<table border="1">
  <tr>
    <td style="background-color:#aaaaaa;">Column #1</td>
    <td style="background-color:#aaaaaa;">Column #2</td>
    <td style="background-color:#aaaaaa;">Column #3</td>
    <td style="background-color:#aaaaaa;">Column #4</td>
  </tr>
  <tr>
    <td colspan="2" style="background-color:#aaaaaa;">Column #5</td>
    <td colspan="2" style="background-color:#aaaaaa;">Column #6</td>
  </tr>
  <tr>
    <td>Rec #1 value #1</td>
    <td>Rec #1 value #2</td>
    <td>Rec #1 value #3</td>
    <td>Rec #1 value #4</td>
  </tr>
  <tr>
    <td colspan="2">Rec #1 value #5</td>
    <td colspan="2">Rec #1 value #6</td>
  </tr>
  <tr>
    <td style="background-color:#dddddd;">Rec #2 value #1</td>
    <td style="background-color:#dddddd;">Rec #2 value #2</td>
    <td style="background-color:#dddddd;">Rec #2 value #3</td>
    <td style="background-color:#dddddd;">Rec #2 value #4</td>
  </tr>
  <tr>
    <td colspan="2" style="background-color:#dddddd;">Rec #2 value #5</td>
    <td colspan="2" style="background-color:#dddddd;">Rec #2 value #6</td>
  </tr>
</table>

Thank you for help.

Best regards,
  David Mensik.

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 18 May 2009, 10:30 AM
Hi David,

You allow the contents of the columns to wrap, if the predefined width is not sufficient. This sample represents one similar setup.

Greetings,
Yavor
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
David
Top achievements
Rank 1
answered on 19 May 2009, 07:38 AM
Hi,
thanks for reply, but this is not what I want to have. What I need is to break each data row to more then 1 grid row. Not to have cell content wrapped.

Please answer me, if this behaviour is possible.

Thank you.

Best regards,
  David.
0
Yavor
Telerik team
answered on 20 May 2009, 10:31 AM
Hi David,

In this case, you can use template columns, to alter the layout of the standard cells.
Other than that, you cannot easily alter the layout on demand, for example dynamically.

Greetings,
Yavor
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.
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
Yavor
Telerik team
David
Top achievements
Rank 1
Share this question
or