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

How to transpose rows and columns in a KendoUI grid?

3 Answers 608 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joonu
Top achievements
Rank 1
Joonu asked on 08 Nov 2012, 07:08 PM
Hi Team,

I wish to display statistical data for multiple countries in my grid. The way I retrieve data from the database, my grid would show data a bit like the following:

Country    Area(km^2)    Population        GDP($ trn)    GDP Growth (%)    Inflation (%)
India          3288000         1220200000       1.848             6.8                           7.9
USA          9827000          314686189         15.09            1.7                            2.0
.
.

But instead of the format above, I wish it show like the following:

Country                    India                USA                .
Area (km^2)             3288000          9827000         .
Population               1220200000    314686189     .
GDP ($ trn)              1.848               15.09              .
GDP Growth (%)      6.8                  1.7                   .
Inflation (%)              7.9                  2.0                  .

Please let me know how I could achieve this transposition.

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 13 Nov 2012, 03:56 PM
Hi Joonu,

 
Basically transposing of the Grid currently is not supported out-of-the-box, however you can implement custom solution for example by transposing the data manually on the sever side and send it to the Grid. 

Also you should share your idea at the Kendo UserVoice to allow other users vote for it. Most voted ideas are included in next KendoUI releases.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Diga
Top achievements
Rank 1
answered on 22 May 2015, 02:22 AM

Hi Vladimir,

Does this solution (http://blogs.telerik.com/xamlteam/posts/09-02-16/transpose-or-just-rows-as-columns.aspx) works for Kendo UI Grid? If not, is it possible to achieve it using Pivot Grid?

 I would appreciate if you can provide me with some sample code (either using Grid or Pivot Grid).

Thanks!

0
Vladimir Iliev
Telerik team
answered on 25 May 2015, 07:21 AM
Hello Diga,

Yes, the linked extension method can be used for transposing the Grid data on the server side.

Regards,
Vladimir Iliev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Joonu
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Diga
Top achievements
Rank 1
Share this question
or