By dgsoft - 2/22/2010
Hi,
I looking the way to create Grid with multitable content. For example, if dataset contains 2 tables with relation between them, with DevExpress datagrid I can display both tables and expand row of master table to see related records from child table.
This works with DataSet .. but I can't imagine how it works with BusinessObjects and BBS... how to build using BOs this DataSource for the grid.
If you have example, would you be so kind to send it, or maybe any solution for this problem
Thank you
Denis Gavrikov
|
By Peter Jones - 2/22/2010
Hi Denis,
Unless I misunderstand you I think this falls into the 'its so simple - why didn't I think of that' category (of which I have had many!).
Create your BO.
Drop it on the form.
Drop a S/Frame BBS onto the form.
Assign the BO as the data source for the BBS.
Go to the properties page for your grid and assign the BBS to the grid's DataSource and you're done.
Cheers, Peter
|
By dgsoft - 2/22/2010
Hi,
Ok.. I try to explain the problem.
I have 2 tables. for example Customers and Orders with relation by Customer Id..
Now I want using DevExpress DataGrid display the customer list.. and related orders.
For this purpose in the DevExpress Example they create DataSet, add Customers and Orders Tables into the DataSet.
Add relation Object to dataset
and set the DataSource of DevExpress DataGrid ás DataSet..
Then.. I can see my customers list in the grid with [+] - like as Treeview.. and when I expand row.. I can see the grid with Orders!
Now.. what can I do with BusinessObject.
I create BO based on CUstomers.
Ok.. Made new WinForm.. put CustomersBO to the form,
Add BBS and bind BBS to the DataGrid DataSOurce..
Now I have customers list.
But HOW TO ADD relation and Orders Table to the same grid?
Thanks
Denis
|
By Peter Jones - 2/22/2010
Hi Denis,
So, for whatever reason, a master grid with a related child grid isn't ok. You must display both parent and child in same grid. Is this right?
Cheers, Peter
|
By Charles R Hankey - 2/23/2010
I am guessing here, but wouldn't you use the technique Trent or Ivan or Edhy or somebody demonstrated for parent-child in RSS reports - i.e. the child BO becomes a property of the parent BO and is referenced that way?
I'll look around in my test apps to see if I can find a sample. I was thinking about this very problem the other day when I was considering buying the Infragistics grids. Edhy probably already knows the answer since he uses them.
|
By Charles R Hankey - 2/23/2010
Okay, I think this is what I was looking for.
http://forum.strataframe.net/FindPost22343.aspx
|
By dgsoft - 2/23/2010
Hi, thats right. I want to dispalay parent and child records in same grid.. the reason is
I have products and accessories tables.. accessories table just has parent_product_id, product_id.. and I have a winForm where I show product detail with possibility to book the product..
For me - it looks the best way to display products and accessories in Treeview style (parent-child in the DataGrid) and product detail window.
Thanks
Denis
|
By Peter Jones - 2/23/2010
Hi Denis,
Well, standard parent / child stuff in SF is easy. Just a matter of setting up the relationships in the BO's (plenty of stuff in the SF Help). But how to render it all in one DevEx grid - I don't know. This does seem like a DevEx issue rather than a SF issue though.
Cheers, Peter
|
By Trent L. Taylor - 2/24/2010
Denis,
You can tell that these guys have been in the trenches before as they know what they are talking about!
Yes, I think that your best best is to create a CustomBBS like you would for a report to create an object model, at which point I see no issue with the grid working. We actually do this with an Infragistics grid in our medical application. Just FYI, when you do this, you are better off trying to make this a read-only environment. Making this go both ways is possible (though more difficult), but we discovered that it confused our end-users. Go figure.
|