BusinessObjectLayer.ParentBusinessObject become NULL in Field_FieldName_Descriptor


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

I faced problem that BO.ParentBusinessObject become null in BO.FieldPropertyChanged event. After some debugging, I found that, BO.ParentBusinessObject is already become null in Field_FieldName_Descriptor.SetValue(). Once I leave this method, the ParentBusinessObject "came back".



Any ideas? Anyone able to access ParentBusinessObject in FieldPropertyChanged without problem?



Thank you
StrataFrame Team
S
StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Are you using the business object within a grid with the BusinessBindingSource?
Chan
Chan
Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Yes.
StrataFrame Team
S
StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)StrataFrame Developer (4.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
For business objects to work properly with a grid, we had to create the BusinessBindingSource, which creates a new instance of the business object for each record that is accessed through the BusinessBindingSource... these business objects all share a common DataTable internally (so they all look like they're the same business object).  Most likely, when you see a reference to ParentBusinessObject that is empty, the business object you are referencing is one that has been created by the BusinessBindingSource.  So, I think we simply need to set the ParentBusinessObject property on each business object that is created by the BusinessBindingSource... and I don't think it's doing that right now.
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