private void ctlSearchCriteria_Load(object sender, System.EventArgs e) { if(!this.DesignMode) { this.grdItems.BindingSource=_BindingSource; this.CreateColumns(); this.SetColumnHeadings(); this.SetColumnWidths(); mmBindingStrategyDataGrid.RegisterBoundControl(this.grdItems); if(this.AllowAnyAll) BindCheckAllCheckbox(); } } private void BindCheckAllCheckbox() { mmBusinessObject oBiz = this.GetBusinessObject(); this.chkAll.BindingSource=_BindingSource; this.chkAll.BindingSourceMember=oBiz.TableName+"AnyAll.All"; mmBindingStrategySimple.RegisterBoundControl(this.chkAll); }So basically the bizobj has two tables - the primary one is pointed to by the TableName. The second table is named as a concatenation of the first table name, and "AnyAll". So if the table name were "Order", the second table would be named "OrderAnyAll". Therefore, the BindingSourceMember is set to "OrderAnyAll.All"
// Only data bind if the table that changed is the same as the // table (or DataView table) to which this control is bound if (DataTableName.ToLower() == e.TableName.ToLower() && !mmString.Empty(MemberName)) {DataTableName.ToLower() is "orderanyall" and e.TableName.ToLower() is "order" and MemberName is "All", so the binding code within the if statement never runs due to the difference in table names.
mmBusinessObject oBiz = this.GetBusinessObject(); DataSet oDS = oBiz.GetCurrentDataSet(); this.chkAll.DataBindings.Clear(); this.chkAll.DataBindings.Add("Checked",oDS,oBiz.TableName+"AnyAll.All");Maybe I'm calling the wrong binding strategy?