Matrix Data Binding - Crosstab?
OK .. I searched for this, but could not seem to find an answer.
Is there any way to bind a two dimensional many-to-many data table to a grid control so that it shows up in matrix form? Or is there another control that I could use?
FYI - I am using DevExpress controls, so would prefer a solution utilizing their controls.
Example (Bad example but you get the idea):
Table Books Borrowed
Person1-------Person2------BorrowedBooks
Jill1------------Jon1------------2
Jake1----------Jamie1----------4
Chris1----------Jake1-----------3
Matrix
--------Jill1----Jon1---Chris1---Jake1---Jamie1
Jill1-----0-------2-------0-------0-------0
Jon1----0-------0-------0-------0-------0
Chris1---0-------0-------0-------3-------0
Jake1---0-------0-------0-------0-------4
Jamie1--0-------0-------0-------0-------0
Re: Matrix Data Binding - Crosstab?
You can't bind a multidimensional array to a grid, but if your data is in a DataTable then it's just a matter of assigning it to the grid's DataSource.
Re: Matrix Data Binding - Crosstab?
Thanks ... but that's not incredibly helpful. If you can show me how to convert a table into a crosstab datatable that I could then bind to the grid, or better yet dynamically generate crosstab Data objects that I could then bind to the table ... then that would be helpful. If anyone knows of a control that can handle matrix data ... that would be helpful.