By Chan - 9/14/2007
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
|
By Trent L. Taylor - 9/17/2007
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?
|
By StrataFrame Team - 9/18/2007
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.
|
|