0
我有代码中显式创建列的DataGrid。我绑定WPF元素在这样的代码:数据绑定子属性对象null
var path = "ReferenceProperty." + otherObj.StringProperty;
var dataBinding = new Binding(path) { TargetNullValue = "not set" };
当我在DataGrid中创建新行出现的问题,是的ReferenceProperty空,抛出异常。 如果我尝试在默认ctor中创建ReferencePropertys对象,NHibernate认为在刷新之前没有保存临时对象。 我该如何解决它?
在此先感谢。
但我真的不想创建转储对象。我宁愿以某种方式检查ReferenceProperty是否为空。 – 2011-05-06 08:11:57