:: Forum >>

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
Tuesday, January 2, 2007
Can you just swap column and row indices in your data array?
Alex (ActiveWidgets)
Thursday, January 4, 2007
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
Friday, January 5, 2007
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)
Friday, January 5, 2007
Wow! thanks a lot Alex
great help

Monday, January 8, 2007
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 ?
Tuesday, January 9, 2007
pls anyone look at it and let me know how to perform this
Thursday, January 11, 2007

This topic is archived.

Back to support forum

Forum search