Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit Is it possible to make the Columns as rows and Rows as columns in Datagrid
3 replies. Latest Post by Amanda Wang - MSFT on July 2, 2009.
(0)
vijayvvk
Member
0 points
5 Posts
06-29-2009 5:13 AM |
Hi All,
As per my requirement, I have to show columns Horizontally and rows Vertically. User will add Columns instead of rows. Can anyone let me know, how i can achieve this requirement.
Thank You.
Regards,
Vijay
Jac_P
Participant
1044 points
189 Posts
06-29-2009 5:26 AM |
Hi,
I really dont think any grid supports this.
What you can do is that : create a class with properties as transpose of your existing class, Convert the data to new format and then do the binding.
Thanks
Jac
hemanth53
11 points
8 Posts
06-30-2009 1:23 AM |
You can also handle this in Database, if your requiremet suites.. fetching the records in the required structure Using PIVOT in SQL Server and then bind the grid.
Kumar
Amanda W...
All-Star
17234 points
1,466 Posts
07-02-2009 5:37 AM |
Hi Vijay,
vijayvvk:As per my requirement, I have to show columns Horizontally and rows Vertically. User will add Columns instead of rows. Can anyone let me know, how i can achieve this requirement.
You can try to use sivlerlight 3's Perspective Transforms to implement this.
AND you will notice, the text in datagrid has been Transformed too.
So, we would suggest that you can try to use DataGridTemplateColumn , you can find the controls in the DataGridTemplateColumn, and then Transformed them after your Transformed the whole datagrid.
About the Perspective Transforms in silverlight 3, you can try to refer this link: http://www.silverlightshow.net/items/Perspective-3D-in-Silverlight-3.aspx