Tutorial/Sample of FlexGrid bound to Access with multi-level master detail tabl

Posted by: mfairorth on 15 July 2019, 4:23 pm EST

    • Post Options:
    • Link

    Posted 15 July 2019, 4:23 pm EST

    Hello,

    I’m new to ComponentOne, we are trying to put together a POC showing FlexGrid capabilities to perform CRUD operations on a simple Access database. DB has 3 tables (for this POC purpose) with multi-level master-details. Table 2 is details for Table 1, Table 3 is is details for Table 2, with typical numeric primary key for linking. Think of the common scenario of three tables named Customer, Orders, and OrderLines.

    Can someone point me to any support docs that will help me implement this? I am able to bind a FlexGrid to the Access db and a table or view, but I want a true nested (cascading) effect in the Grid so I can perform CRUD operations on any data from any of these tables. Is this possible with the FlexGrid?

    Thanks!

    Marc

  • Posted 15 July 2019, 10:36 pm EST

    Hello,

    FlexGrid does not have any direct feature to show the data in the Hierarchical view.

    But there is a sample name “DataTree” in ComponentOne samples where FlexGrid is used to show the hierarchical data using a custom class name “C1FlexDataTree”.

    You can find the sample in your system at location : “…\Documents\ComponentOne Samples\WinForms\C1FlexGrid\CS\DataTree”

    As built-in hierarchical binding is not a default feature of FlexGrid so we may not have complete control over it to perform CRUD operation.

    If you need any other help please let us know.

    Thanks and Regards,

    Prabhat Sharma.

  • Posted 16 July 2019, 12:12 am EST

    Hello Prabhat,

    Thank you so much for the very prompt reply! It is greatly appreciated. I have read a lot of your posts in the user forums and I can see you are a great resource for your company.

    So you let me know that what I should look at is the C1FlexDataTree, which I will check out now. But I wanted to ask you for your recommendation and a direction I should pursue as I try and build out a Proof of Concept for my company to purchase ComponentOne.

    Our need is what I consider fairly standard, a set of hierarchical tables with simple one-to-many relationships. What is the best, easiest to implement, hopefully low coding required (at least initially) solution to having a CRUD system for the records in these three. I was hoping it could be so simple as to drop a sophisticated control (like the FlexGrid, but I am open to any) onto a form and bind up a properly normalized database (Access). Maybe that is an over-simplification. What would you suggest? Do you have a sample app that does this I can use as a starting point? I am ok if there are multiple controls on the form or if it required multiple forms, I am just trying to get something up and running quick, so I can present to my boss and convince him of my project.

    Thank you so much in advance of anything you can suggest or provide for me.

  • Posted 16 July 2019, 6:04 pm EST

    Hi Marc,

    The “DataTree” sample, as mentioned by Prabhat, is exactly what you require.

    The sample shows 3 tables (retrieved from Access mdb file): Customers, Orders, and OrderDetails. Each table has 1-many relationship to the next one.

    The best method would be to use the “DataTree” sample as your starting point. Also, CRUD operations will also work correctly (you would need to use the table adapters to update the database, you can refer to the “DBUpdate” sample to see how to do this).

    If you still have any questions after you’ve checked out this sample then please let us know.

    Regards,

    Jitender

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels