论坛中的仓位赋值也有很多介绍,现在我的问题是
// 取销售出库的出货仓位字段元数据(弹性域类型)
RelatedFlexGroupField stockLocFld = this.View.BillBusinessInfo.GetField("FStockLocID") as RelatedFlexGroupField;
long stockLocld = 100188;
DynamicObject[] stockLoc = BusinessDataServiceHelper.LoadFromCache(this.Context, new object[] { stockLocld },stockLocFld.RefFormDynamicObjectType);
// 把仓位数据包,填写到数据行上
DynamicObject stockobj = this.View.Model.GetValue("FStockLocID", e.Row) as DynamicObject;
stockLocFld.DynamicProperty.SetValue(stockobj, stockLocld);
stockLocFld.RefIDDynamicProperty.SetValue(stockobj, stockLoc[0]);
关键是DynamicObject stockobj = this.View.Model.GetValue("FStockLocID", e.Row) as DynamicObject; 这个仓位本身是null的,
一直提示这个地方报错
请教怎么解决
推荐阅读