Kindly help me..how shall i bind ID and DisplayName in combobox inside Dataform. it should work properly after selecting DataGrid Records.
Following code i have written ..but its not working properly
following is my LINQ code:
public List GetResourceDetail()
{
List resources = (from f in context.Resources
join add in context.Addresses on f.ResourceId equals add.AddressTypeId
where add.AddressType == "RE"
select new ResourceDTO()
{
ResourceID = f.ResourceId,
FirstName = f.FirstName,
MiddleName = f.MiddlleName,
LastName = f.LastName,
DepartmentID = f.DepartmentId,
IsActive = f.IsActive,
SalutationID = f.SalutationId,
Notes = f.Notes,
Address = new AddressDTO()
{
AddressLine1 = add.AddressLine1,
AddressLine2 = add.AddressLine2,
AddressLine3 = add.AddressLine3,
AddressLine4 = add.AddressLine4,
AddressType = add.AddressType,
AddressTypeId = add.AddressTypeId,
City = add.City,
StateID = add.StateId,
Email = add.Email,
AlternateEmail = add.AlternateEmail,
Phone = add.Phone,
AlternatePhone = add.AlternatePhone,
CountryID = add.CountryId,
County = add.County,
Fax = add.Fax,
Zip = add.Zip
},
}).ToList();
if (resources.Count() == 0)
{
// throw new Exception(BLMessage.ResourceNotFound);
}
return resources;
}

suman vangara4 reputationPosted Jan 19, 2010, 2:01 AM EST
This might help you http://forums.silverlight.net/forums/t/152818.aspx ..
Thanks and Regards
Suman