3.0 beta 2

How to change the datagrid column structure to row

i am using datagrid product, by default it display headers in Top row and relevant data in other rows( records are displayed in row way now i need column way)
But i want to display headers in first column rest of the records in other column

do we have any support for this in data grid if yes what all the changes i should make, if not what is the other solution.

empid empName
1 sufy
2 far
3 shr

The above should be displayed as follows using data grid

empid 1 2 3
empName sufy far sha

Thanks in advance
January 2,
Can you just swap column and row indices in your data array?
Alex (ActiveWidgets)
January 4,
Well i could able to do it for grid ( i mean data) but not for headers
when i see innerHTML of header data headers are appened to span so it comes in same line how to convert it for div or any suggestion
January 5,
You can hide column headers and unhide row selectors:

var obj = new AW.Grid.Extended;

obj.setHeaderVisible(false); // hide column headers
obj.setSelectorVisible(true); // show row headers (selectors)

obj.setCellData(function(col, row){return col + "." + row});
obj.setSelectorText(function(row){return "row " + row});


Alex (ActiveWidgets)
January 5,
Wow! thanks a lot Alex
great help

January 8,
Hi Alex,
I have a question
After doing the above now if i add new record to the grid its adding horizontally rest of the data is fine

new record disply horizontally it should display verically(column wise)

4 manu 400
empid 1 2 3
empName sufy far sha
empsal 100 200 300

where exactly i should make this changes in deltas/JSON or how ?
January 9,
pls anyone look at it and let me know how to perform this
January 11,

This topic is archived.

See also:

Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.