I have created a Silverlight application using CSLA,without MVVM.
Database Name;EmployeeDb
Tables:
1] Country {Id,CountryName}
2] State{Id,StateName,CountryId}
I have developed StateEdit.cs,StateGetter.cs,StateExistCommand.cs, StateInfo.cs, StateList.cs.
My StateList.xaml contains a state datagrid with columns as Id,StateName,CountryName.
I want to display the CountryName of the CountryId from State table on xaml.
To do this,What is the code required in StateInfo.cs & StateList.cs?
Now Datagrid displays CountryId. But how to display its respective CountryName?
The simple answer is to ad CountryNameas property to StateInfo and load field value when loading data from the database.
Or if you are concenerned about message size you may load CountruId and CountryName into a KeyValueList and cache the list.
Then make the CountryName property in StateInfo do a lookup in the KeyValueList to return the actual name.
Thank you.. My problem is solved now...
Copyright (c) Marimer LLC