How to transpose rows and columns in a KendoUI grid?

4 posts, 0 answers
  1. Joonu
    Joonu avatar
    6 posts
    Member since:
    Sep 2012

    Posted 08 Nov 2012 Link to this post

    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.
  2. Vladimir Iliev
    Vladimir Iliev avatar
    2206 posts

    Posted 13 Nov 2012 Link to this post

    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!
  3. Diga
    Diga avatar
    4 posts
    Member since:
    May 2015

    Posted 21 May 2015 in reply to Vladimir Iliev Link to this post

    Hi Vladimir,

    Does this solution ( 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).


  4. Vladimir Iliev
    Vladimir Iliev avatar
    2206 posts

    Posted 25 May 2015 Link to this post

    Hello Diga,

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

    Vladimir Iliev
    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
Back to Top