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

rowspan over all rows of detail table

3 Answers 203 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Cheri Verdend
Top achievements
Rank 1
Cheri Verdend asked on 31 Dec 2009, 07:34 PM
In my RadGrid I have a master table and a detail table. I need the first column of the detail table to display an image that rowspans the entire detail table. The url of the image to be displayed is a datakeyvalue from the mastertable row.

So, if the detail table has 2 records, the image will rowspan 2 rows; if the detail table has 10 records, the image will rowspan all 10 records. 

I've seen some code for setting a rowspan in a master table, but I can't seem to get it work for a detail table. 

Any help would be greatly appreciated!

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 05 Jan 2010, 09:09 AM
Hi Cheri,

Basically, in such a scenario, it is best to use the NestedViewTemplate, which gives you an easy, straightforward and flexible way to declare the look and feel of the nested level of the hierarchy. One such setup is declared in the following demo:

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

I hope it gets you started properly.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Cheri Verdend
Top achievements
Rank 1
answered on 05 Jan 2010, 11:32 AM
Hi Yavor,

Yes, I am using a NestedViewTemplate for my detail table. My problem is how to get the first column of the detail table to rowspan the entire detail table.

I've found code that works on the main table only, and shows how to rowspan 2 rows only. But no luck in getting the rowspan to work on a detail table, or for the rowspan to span the entire (detail) table. 

Is this even possible?
0
Yavor
Telerik team
answered on 06 Jan 2010, 08:09 AM
Hello Cheri,

The following code library shows how to span a cell over multiple positions. You can access any cell, for any table in such a way, in order to span it. The following article, in turn, shown how to reference the detail tables in the control:

http://www.telerik.com/help/aspnet-ajax/grdtraversingdetailtablesitemsingrid.html

I hope this helps.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Cheri Verdend
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Cheri Verdend
Top achievements
Rank 1
Share this question
or