StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Business Objects and Data Access (How do I?)
»
Binding BOs to EnhancedList with Parent-Child relationship.
Binding BOs to EnhancedList with Parent-Child relationship.
Post Reply
Like
1
Binding BOs to EnhancedList with Parent-Child relationship.
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Lukasz Kustusz
Lukasz Kustusz
posted 15 Years Ago
ANSWER
HOT
Topic Details
Share Topic
Group: Forum Members
Posts: 29,
Visits: 125
Hello,
I'm quite new to Strataframe Framework. I installed the trial version just yesterday. I'm working on a log viewer project that would represent log records from the DB using the DevExpress gridview (which is the EnhancedList wrapper from the SF).
The way my DB tables are structured are quite simple. I have three different logs that I'd like to represent in my grid. I have a MasterTable with PK = Rec_ID and LogType_ID, and I have 6 other tables, one for each log type. The MasterTable contains fields common to all logs, like time, user, etc. Each log table also has a Rec_ID, and LogType_ID. I also have a LogTypeDescription table with two fields (LogType_ID, LogDescription) with 6 records in it, each describing different log type.
I've created my BOs, one for each of the tables defined above, and I defined relationdhips between them using ParentRelationship property. Relationships are simple: MasterTable is the parent to all other tables, linking on the Rec_ID, LogType_ID.
I'd like to be able to see those relationships represented in the grid using its Master-detail view, where master records would be expandable showing a different view depending on the type of log.
I was able to bind my MasterTable to the grid (Using BusinessBindingSource bound to the Mastertable), but the relationships are not detected. I've already done something similar using embedded ADO.NET dataset, and it works fine, but I'd like to se if strataframe can do similar tricks. Form the DevExpress documentation I know that in order for the Master-Detail view to work I have to Master-Detail: DataTable specific names for the TableAdapters, ie. AdapterTable1, AdapterTable2 etc (This is in
Windows Forms Components
>
Products
>
XtraGrid
>
Concepts
>
Master-Detail Overview
>
Binding to Data Specifics
>
Master-Detail: DataTable Use
of the DevExpress documentation)
-> How can I do this with EnhancedList and BOs?
-> Do I have to use BusinessBindingSource, and if not how should I set up the binding?
-> How can I specify that the LogType_ID from every BO be "replaced by" LogDescription from the LogTypeDescription BO?
-> Is there a way for a BO to represent a join of two tables?
Thanks,
Lukasz
Reply
Like
1
Replies
Lukasz Kustusz
Lukasz Kustusz
posted 15 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 29,
Visits: 125
Thanks Ivan, I finally solved the issue with some support from the DevXpress. The problem was with the test for rowcount=0 at the begining of the above procedure: Here's the full description of my solution:
http://www.devexpress.com/Support/Center/p/Q275267.aspx
I still think that this type of join should be handled at the business layer, though. In SF forums I found some posts where this is mentioned:
http://forum.strataframe.net/Topic25388.aspx
http://forum.strataframe.net/Topic3321.aspx
http://forum.strataframe.net/Topic5719.aspx
There seems to be several ways, like using DB Views, or dummy ddt profiles, or updating custom fields in the interface (my case). They all seem to have some drawbacks, especially when BOs must be updatable. In contrast, using ADO.NET, while being a more manual approach, does provide a possibility to construct DataSets from joins, with custom UPDATE, DELETE, and INSERT statements if necessary.
My situation is special in that I'm just testing the StrataSphere out (using the trial version for almost a week) to see if it can give us an advantage over using other frameworks (I'm also evaluating MereMortals, DevExpress) or just sticking to self-developed n-tier approach with ADO.NET in all our future developments.
At the moment I'm undecided. Let me ask you this:
Is there a plan to support BO joins in the near future?
Reply
Like
1
Ivan George Borges
Ivan George Borges
posted 15 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
As Trent has written to you before, StrataFrame covers many different tasks and this might be the diferential to help you make your decision.
About the future plans and features, I wouldn't be able to tell you about your specific question at the moment, but will try and find out with the developers.
Anyway, I am glad you got your problem solved.
Reply
Like
1
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Binding BOs to EnhancedList with Parent-Child relationship.
Lukasz Kustusz
-
15 Years Ago
Hi Lukasz. Take a look at the posts from here, they can help you:...
Ivan George Borges
-
15 Years Ago
Thank you for your answer. Unfortunatelly I don't see how this applies...
Lukasz Kustusz
-
15 Years Ago
Thanks for your interest in StrataFrame. As you well know, there are a...
Trent L. Taylor
-
15 Years Ago
Thank you, Trent. I do see your point, to avoid grid-central design,...
Lukasz Kustusz
-
15 Years Ago
Hi Lukasz. I went ahead and downloaded DevEx to create a quick sample...
Ivan George Borges
-
15 Years Ago
Thank you very much for the sample, I'm eager to try it out. I imagine...
Lukasz Kustusz
-
15 Years Ago
It uses the StrataFrame Sample database that is installed with the SF...
Ivan George Borges
-
15 Years Ago
Thank you again for all your support. I've rebuilt my project...
Lukasz Kustusz
-
15 Years Ago
You are welcome, Lukasz. To accomplish what you asked, I would add an...
Ivan George Borges
-
15 Years Ago
Thank you for your comment. I tried it but it doesn't work exactly as...
Lukasz Kustusz
-
15 Years Ago
See previous post
Lukasz Kustusz
-
15 Years Ago
That is the way I usually go. On the grid, you probably need an event...
Ivan George Borges
-
15 Years Ago
Thanks Ivan, I finally solved the issue with some support from the...
Lukasz Kustusz
-
15 Years Ago
As Trent has written to you before, StrataFrame covers many different...
Ivan George Borges
-
15 Years Ago
Post Reply
Like
1
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search