Error provider and grid


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

I bind my BO to grid using BusinessBindingSource. When I debug ShowBrokenRule() method, found that _boundcontrols.Count = 0. However, error provider will be shown in grid column if any rule broken.



Please advice.



Thank you
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
The _BoundControls may not have been populated at that point in your debug.  ALso, there are some logic differences between binding through a BBS to a grid and binding to a control such as a textbox outside of the BBS.  What are you trying to accomplish here?  Prevent the broken rules from appearing?
StrataFrame Team
S
StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)StrataFrame Developer (4.7K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
If you are trying to reference the business object from within an event handler of the grid, chances are good that you're using the wrong BO reference.  The BusinessBindingSource wraps the business object and returns a new instance of the business object for each record requested by the BBS (because most grids store off the refence to the list object, and if they were all the same, it would cause a problem).  So, if you are checking broken rules, or trying to add a broken rule from within your grid, you'll need to use the BBS.BusinessObject reference, because that is the reference to the business object that has the bound controls.
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