Master and details devexpress grid wuth SF BO


Author
Message
Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Any sample code to show how to have master and details BOs shown in XtraGrid (in same grid)?



Thank you
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Same grid meaning multiple bands within the grid?
Paul Chase
Paul Chase
Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Chan,

Here is how I am doing it.

Attachments
DevEx.zip (195 views, 142.00 KB)
Robin J Giltner
Robin J Giltner
StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)StrataFrame User (125 reputation)
Group: Forum Members
Posts: 105, Visits: 650
Thats pretty cool.  Thanks for the example Paul.

Robin Giltner

Paul Chase
Paul Chase
Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Yeah I like it it is great for reports as well, I have an editable version as well, It is almost complete  still have a few minor things but for the most part it works
Peter Jones
Peter Jones
Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Paul,

I didn't understand what Chan was getting at so I couldn't help but I certainly have an interest in Master/Detail and DevExpress so I was keen to see what you have done. I opened the project but it gave me an error (illegal form or some such thing). Paul would you be good enough just to post a screen shot of what the form looks like.

Cheers, Peter

Paul Chase
Paul Chase
Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Peter,

I'm not sure why would have an issue unless maybe you have a different version of Dev Ex installed. maybe if you remove and re-add the dev ex references it will work.

Anyways what I did was create a class that inherits from dataset so I can then drag and drop business objects onto it and it adds them to the dataset so you end up with a typed datset with relations etc. So far it works well for me I am not doing any zillion recrods grids or reports so there could be some issues.

 

Now I have a typed data set in my toolbar that contains whatever business objects I dropped onto it. I can then drag and drop it onto a form or report and use it as a data source.

If I drop it on a form with a Dev Ex grd I can assign it as the data source

and datamember

The end result is a grid with master child navigation

or a report with child bands


Peter Jones
Peter Jones
Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Paul,
Thanks for that. The screen shots are bit hard to read but I think I get the picture and yes indeed this is very interesting. I will revisit the project you sent and get it to work (I'm 7.2 DevEx as well so its not that). It looks as though you have got DevEx's inbuilt parent/child facilities working using standard BO's. When I looked at doing this some time ago I gave up because it looked as though I would have to dump the SF BO's and create a hierarchical dataset in code and manage it myself.

Again, thanks for the very prompt response - much appreciated.

Cheers, Peter

Peter Jones
Peter Jones
Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)Advanced StrataFrame User (504 reputation)
Group: Forum Members
Posts: 386, Visits: 2.1K
Hi Paul,

I saw 7.2 and I thought our versions where the same but you are 7.2.2 while I'm still using 7.2.1. Anyway I can see things now and what you've done looks really good - I will certainly take a much closer look because the inbuilt Parent/Child stuff in DevExpress always seemed like a very clean UI to me. A couple of questions though:

1) When I look in the code I see only boCustomer is exposed. Could all the bo's be dropped on the form and everything would work ok?

2) In the screen shots I see the SF toolbar is on the form. Does that work ok in whatever grid view has focus?

3) I take it the general flow is the BOs are populated as normal and, within DataSetBase (very clever BTW), the relations are created (using info from the BOs) and the data loaded for use in the various grids. If this is so how do changes in DsCustomerOrders dataset make their way back into the BO's for saving to the database?

Cheers, Peter

Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Thank you for sample.

I have tried it, but VS keep complaining it is not typed dataset. (I attached the code)

I also tried to add your sample project to my solution, and add to my form (difference project). VS unable to locate the sample dataset while trying to add item to toolbox.



Any ideas?



Thank you
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search