This question is locked. New answers and comments are not allowed.
Hi,
Can anyone point me in the right direction on how to handle EntityRefs in a DataForm?
At the simplest level, my DataContext has a Table with a Many:1 relationship to a Country table like so:
[Column]
internal int _countryId;
private EntityRef<Country> _country;
[Association(Storage = "_country", ThisKey = "_countryId", OtherKey = "id", IsForeignKey = false)]
public Country Country
{
get { return _country.Entity; }
set
{
NotifyPropertyChanging("Country");
_country.Entity = value;
if (value != null)
{
_countryId = value.id;
}
NotifyPropertyChanging("Country");
}
}
How would I tie this in XAML to a RadPickerList? Preferably as simple as I would do with a standard Data Field Type.
This is the first time I'm using the RadDataForm so I'm a little bit lost on the best (and most efficient) way to proceed, any help would be gladly appreciated.
Cheers,
Ron.
Can anyone point me in the right direction on how to handle EntityRefs in a DataForm?
At the simplest level, my DataContext has a Table with a Many:1 relationship to a Country table like so:
[Column]
internal int _countryId;
private EntityRef<Country> _country;
[Association(Storage = "_country", ThisKey = "_countryId", OtherKey = "id", IsForeignKey = false)]
public Country Country
{
get { return _country.Entity; }
set
{
NotifyPropertyChanging("Country");
_country.Entity = value;
if (value != null)
{
_countryId = value.id;
}
NotifyPropertyChanging("Country");
}
}
How would I tie this in XAML to a RadPickerList? Preferably as simple as I would do with a standard Data Field Type.
This is the first time I'm using the RadDataForm so I'm a little bit lost on the best (and most efficient) way to proceed, any help would be gladly appreciated.
Cheers,
Ron.