Dim NewGrd As C1FlexGrid = New C1FlexGrid
'set up dimensions
NewGrd.Rows.Count = grdView.Cols.Count
NewGrd.Cols.Count = grdView.Rows.Count
NewGrd.Rows.Fixed = grdView.Cols.Fixed
NewGrd.Cols.Fixed = grdView.Rows.Fixed
'copy data types, formats, styles, etc.
'from source columns to dest rows
Dim i As Integer
For i = 0 To grdView.Cols.Count - 1
CopyRowCol(grdView.Cols(i), NewGrd.Rows(i))
Next
'copy data types, formats, styles, etc
'from source rows to dest columns
For i = 0 To grdView.Rows.Count - 1
CopyRowCol(grdView.Rows(i), NewGrd.Cols(i))
Next
'transpose data
Dim r, c As Integer
For r = 0 To grdView.Rows.Count - 1
For c = 0 To grdView.Cols.Count - 1
NewGrd(c, r) = grdView(r, c)
Next
Next
'transfer all data back to original grid
grdView.DataSource = NewGrd
'and do an autosize
grdView.AutoSizeCols()