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

Grid Customization - Slanted header and record in multiple rows

1 Answer 233 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Abhi
Top achievements
Rank 1
Abhi asked on 27 Dec 2011, 01:58 PM
Hi Everyone,

I am looking for below two customization on RadGrid. Has anyone achieved these with ASP.Net RadGrid?
I am looking for IE 7 + solutions only.

1. Slanted headers- Looking to implement slanted headers for some columns since the width of data is less and header text will be more. Slanted headers will reduce the overall width of grid. I am able to implement vertical columns using CSS but not able to create slanted headers.

2. Can I split one record across 2 rows ? One of the fields(say description) is too lengthy. Adding it on one row increases the height of grid. Instead if I display this as another row, the width of grid will be used up. So I am looking to bring one column as a separate row below the rest of fields. Both the rows will together represent one record.

Attached is a image which shows the desired grid format.

Thanks,
Abhi

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 28 Dec 2011, 12:59 PM
Hello Abhi,

Your first requirement cannot be achieved in RadGrid - as you may know, the control's header is a normal table row with th elements. And there is text in these elements. So, it would be possible to have the text at an angle if it was possible to do with a regular HTML table.

As for having a single record on two rows - the grid control is a UI component which displays the data it is bound to in the form the data is available in the datasource - so, each row in RadGrid corresponds to one single record in the datasource, and the other way around. If you want a text to be displayed in two subsequent rows in RadGrid, it should be contained in two subsequent records in the datasource.
Other than this, an option is to not show the whole text in the cell and use an additional control to display the rest of it on click or hover of the cell. For example using a RadToolTip.

Kind regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Grid
Asked by
Abhi
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or