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
Prev
1
2
Jump To Page
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 14 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 29,
Visits: 125
Thank you for your comment. I tried it but it doesn't work exactly as expected. I added an unbound column to the parent view and populate it in the CustomColumnDisplayText like so:
Private Sub GridView2_CustomColumnDisplayText(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs) Handles GridView2.CustomColumnDisplayText
If GridView2.RowCount = 0 Then
Exit Sub
End If
If e.Column.FieldName = "Type" Then
BoMasterLogType1.SeekToPrimaryKey(e.Value)
End If
If BoMasterLogType1.CurrentRowIndex >= 0 AndAlso e.Column.FieldName = "colTypeDescription" Then
e.DisplayText = BoMasterLogType1.Type_Description
End If
End Sub
I call the FillAll method of
BoMasterLogType1 in Form_Load.
It seems to work as far as the display is concerned, ie every row now has the correct LogDescription in the custom column. But it's not working when I drag the LogDescription column to the Group by section. It only shows one log type at a time - the one that's in the curernt row. Grouping by any of the bound columns works fine, ie. all possible values are shown.
Forgive my ignorance, but shouldn't this linking be done in the Buisness or even Data tier? Is it not possible to link two BOs to produce this effect (like a BO join)? If I wanted to replace grid by a form with text boxes, and I wanted to show the description field instead of ID for any given type or category of a BO, do I have to handle it in the interface like this every time?
Reply
Like
1
Lukasz Kustusz
Lukasz Kustusz
posted 14 Years Ago
ANSWER
Post Details
Share Post
Group: Forum Members
Posts: 29,
Visits: 125
See previous post
Edited
14 Years Ago by
Lukasz Kustusz
Reply
Like
1
Ivan George Borges
Ivan George Borges
posted 14 Years Ago
ANSWER
Post Details
Share Post
Group: StrataFrame MVPs
Posts: 1.9K,
Visits: 21K
That is the way I usually go. On the grid, you probably need an event for the Row Initialization.
Reply
Like
1
Lukasz Kustusz
Lukasz Kustusz
posted 14 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 14 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
Post Reply
Like
1
Prev
1
2
Jump To Page
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search