Telerik GridViewComboBoxColumn
-
I realize that this is not a Telerik forum but I also poured through their forums to no avail. Long story short, I am using NHibernate to hydrate my viewmodels and exposing complex objects with their related objects to my view. The issue is that in my grid I have a combobox column that has a collection of objects from the viewmodel, the selectedvalue of which will update the object of the selected item. When I change the combobox everything is great, everything is talking back and forth, all is well. But when I close the control and reopen it, it does not select any value for the column. All code is cut for brevity: View:
ViewModel:
public ObservableCollection Clients { get; private set;}
Entity:
public class Claim : Entity
{
public virtual Client Client { get; set; }
}NHibernate Mapping
public ClaimMap()
{
Table("Claim");
LazyLoad();
Id(x => x.Id).GeneratedBy.Identity().Column("id");
References(x => x.Client).Column("clientId").Not.Nullable();
}
}
}I am sure I could just expose the id values on the Claim object and wire it up that way but it really is swimming against the current of NHibernate to do so. Thoughts? Cheers, --EA
-
I realize that this is not a Telerik forum but I also poured through their forums to no avail. Long story short, I am using NHibernate to hydrate my viewmodels and exposing complex objects with their related objects to my view. The issue is that in my grid I have a combobox column that has a collection of objects from the viewmodel, the selectedvalue of which will update the object of the selected item. When I change the combobox everything is great, everything is talking back and forth, all is well. But when I close the control and reopen it, it does not select any value for the column. All code is cut for brevity: View:
ViewModel:
public ObservableCollection Clients { get; private set;}
Entity:
public class Claim : Entity
{
public virtual Client Client { get; set; }
}NHibernate Mapping
public ClaimMap()
{
Table("Claim");
LazyLoad();
Id(x => x.Id).GeneratedBy.Identity().Column("id");
References(x => x.Client).Column("clientId").Not.Nullable();
}
}
}I am sure I could just expose the id values on the Claim object and wire it up that way but it really is swimming against the current of NHibernate to do so. Thoughts? Cheers, --EA
My guess would be that you're not using TwoWay binding.