Results 1 to 3 of 3

Thread: Matrix Data Binding - Crosstab?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Posts
    89

    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
    Last edited by Beldrueger; Jun 22nd, 2006 at 05:44 PM.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2001
    Posts
    89

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width