I thought I would try to wrap up this thread with a play-by-play of what I did to solve the problem. Thanks
everyone for all of the help!
1) Added code to the CurrentDataTableInitialized and CurrentDataTableRefilled (per Trent and Ivan)
if (CurrentDataTable.Columns["spxInventoryQty"] == null) { CurrentDataTable.Columns.Add(new DataColumn("spxInventoryQty", typeof(decimal))); }
2) Altered the custom property to a basic structure (no reference to the new column)
[<snipped>]
public decimal InventoryQty
{
get
{
decimal mInvQty = 0;
// calculate the amount on hand (pending)
mInvQty = this.onhandqty; // use the invalid value for now (for testing)
return mInvQty;
}
}
3) Filled the BO that applies a similar filter to what I wanted in the BO (removed that part of the problem entirely)
4) Set all new data column values to the existing value of the custom property (note: using the various code supplied in this thread, the best I could do was fill the first row with data from the custom properties...the rows' column data mostly stayed empty)
private void SetColumnValues()
{
foreach (PartsBO mBO in partsBO1.GetEnumerable())
{
partsBO1.CurrentDataTable.Rows[partsBO1.CurrentRowIndex]["spxInventoryQty"] = partsBO1.InventoryQty;
}
}
5) Create a dataset from the CurrentDataTable(s) to be the data source for the DevEx Grid (necessary for the master/detail gridviews, BBS bypassed)
DataSet ds = new DataSet();
ds.Tables.Add(partsBO1.CurrentDataTable);
ds.Tables.Add(salesOrderDetailsBO1.CurrentDataTable);
ds.Relations.Add("SalesOrders", ds.Tables[0].Columns["partindex"], ds.Tables[1].Columns["partindex"], false);
PartsGridControl.DataSource = ds.Tables[0];
PartsGridControl.LevelTree.Nodes.Add("SalesOrders", SalesOrderView);
PartsGridControl.RefreshDataSource();
There are a couple of outstanding issues...the main one is that once I set a column's value in the CurrentDataTable the row is now dirty and the BO wants to save whenever I exit the window. I will do some searching on how to prevent saves in this situation. I am sure it has been covered in the docs or other forum entries. The secondary one is that the lookup data in the related sales order grid (e.g. customer name, unit description, etc.) is always empty. Since this is new water for me, I will do my due diligence and research the DevEx grid more throroughly and come up with a solution.
Thanks, again, for everyone's help! Naturally, if anyone sees something that may help me improve things, feel free to let me know.
Have a great day!
Bill