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

Using WPF Telerik Radgrid to display data vertically

5 Answers 334 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lax
Top achievements
Rank 1
Lax asked on 03 Mar 2015, 07:01 PM

I am trying to display data vertically using wpf telerik RadGrid, which needs to be exported to excel in the same layout format. I have set LayoutTransform property of the telerik wpf radgrid to an angle so as to achieve this, but have run into below issues:

export the data with vertical layout intact,
grid lines disappeared after applying rotation style to the grid cells,
unable to hide the row selection highlight,
horizontal and vertical scrolls are not aligned correctly

Can someone please help me with these? I am also wondering, if is it preferable to use PivotGrid for such layout?

Any suggestions would be of great help!

Thanks in advance, Lax

 

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 04 Mar 2015, 04:08 PM
Hello Lax,

You may try re-defining RadGridView's template in order to adjust it in the way you would like to. Still, this is not an approach we would recommend. As to exporting, you may try manually building the export layout as illustrated on the "SpreadProcessing Integration" WPF Demo. You can also refer to RadPivotGrid examples and online documentation to check how it would work for you.

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
Lax
Top achievements
Rank 1
answered on 04 Mar 2015, 11:03 PM
Thanks for your response, Dimitrina!

I was able to resolve the grid lines disappearing issue, by modifying the data template for the cell and also could fix the scrollviewer issue by adding the grid inside a scrollerviewer and handling the alignment in the code, as suggested in one of the other posts.

But as for export, can you please provide me with some working sample of how to assign the RadGridView's layout as is to the IWorkBookFormatProvider? That would be of great help!

Also, row highlight on hover over of the grid rows needs to disappear, how can I achieve this?

Thanks,
Lax
0
Dimitrina
Telerik team
answered on 06 Mar 2015, 12:16 PM
Hi Lax,

Note that you should not place the GridView inside a ScrollViewer, StackPanel, Grid with Row.Height=Auto or Column.Width=Auto or any container that will measure it with infinity. You can place it in a Grid with Row.Height="*" instead. More on how to increase the performance is described in this performance help article. Having this in mind if you have placed RadGridView in a container that measures it with Infinity, all the rows should be initially realized.

As to working with IWorkBookFormatProvider, you can take a look at this diagram to learn about the organization of a Workbook object and this article that shows how you can set properties of a cell.

As to styling GridViewRows, you can refer to the Styling a Row topic in our online documentation. Please note that using Implicit Styles gives you the ability to easily extract and edit the default ControlTemplates of the controls. You can also follow this article on two different approaches on how to extract the ControlTemplates.

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
Lax
Top achievements
Rank 1
answered on 13 Mar 2015, 12:10 AM
Hi Dimitrina,

Thanks for your inputs!

I agree with you on the GridView inside a ScrollViewer issue.

However, we have figured out a way to display data vertically in RadGridView without any of the above mentioned layout changes for RadGridView in xaml. In the new approach, we are using DynamicObject to create grid rows programmatically and assigning the resulting Object to the Itemsource. This way even export works and layout appears as needed. Rest of the formatting to the cell value displaty etc, we have done, in the grid loaded event in the code behind.

Regards,
Lax
0
Dimitrina
Telerik team
answered on 13 Mar 2015, 05:37 PM
Hi,

Thank you for sharing your findings with the community.

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.

 
Tags
GridView
Asked by
Lax
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Lax
Top achievements
Rank 1
Share this question
or