asp.net mvc - How to transpose rows and columns in a Kendo UI grid in MVC application? -
i using kendo ui grid in mvc application. wish display statistical data multiple countries in grid. way retrieve data database, grid show data bit following:
country area population gdp gdp growth india 3288000 1220200000 1.848 6.8 usa 9827000 314686189 15.09 1.7
but instead of format above, wish show following:
country india usa area 3288000 9827000 population 1220200000 314686189 gdp 1.848 15.09 gdp growth 6.8 1.7
how achieve transposition?
if 1 stumble upon issues, important need set td
property display: block
, , tr
- display: inline-block
. td
fall on top of each other , tr
next each other.
#grid .k-grid-header { float: left; padding: 0 !important; } #grid .k-grid-content { width: 1000px; height: 300px !important} #grid table {width: auto; white-space: nowrap; } #grid tr { display: inline-block; } #grid thead tr { display: inline; } #grid th, #grid td { display: block; border: 1px solid black; height: 30px; padding:15px;}
and working dojo fiddle.
Comments
Post a Comment