This question is locked. New answers and comments are not allowed.
My solution is a standard RIA services application
RadGrid
DomainDataSource
DataContext
LinqToSql DBML
DB
I have tables that have a foreign key, and i'd like to show the name value in the column rather than the id, AND be able to filter on it.
The easiest way to explain it would be
Orders Table
Id
Quantity
Total cost
CustomerId
Customer Table
Id
CustomerName
In my grid I am using the DomainDataContext to automatically pull the data through. So my grid currently looks like this
Id | Quantity | Total cost | CustomerId
And I am using the example on how to do server side filtering. By adding filters to the DomainDataService, I am able to automatically do server side filtering on Total cost and quantity. (e.g. where quantity > 10)
but I would like my grid to to have the name value rather than the Id e.g.
Id | Quantity | Total cost | CustomerName
And I will be required to do filtering on CustomerName (e.g. where CustomerName contains "Smith").
How should I go about this? Will the structure of the DBML be a factor?
Should it be a DBML with 2 tables in it
Orders -> CustomerDetails
or a DBML with a single 'table' in it, with the extra properties and I tell the select query on the domain services side to denormalise / populate those fields
e.g. The "new order" table in the DBML
Id
Quantity
Total cost
CustomerId
CustomerName
RadGrid
DomainDataSource
DataContext
LinqToSql DBML
DB
I have tables that have a foreign key, and i'd like to show the name value in the column rather than the id, AND be able to filter on it.
The easiest way to explain it would be
Orders Table
Id
Quantity
Total cost
CustomerId
Customer Table
Id
CustomerName
In my grid I am using the DomainDataContext to automatically pull the data through. So my grid currently looks like this
Id | Quantity | Total cost | CustomerId
And I am using the example on how to do server side filtering. By adding filters to the DomainDataService, I am able to automatically do server side filtering on Total cost and quantity. (e.g. where quantity > 10)
but I would like my grid to to have the name value rather than the Id e.g.
Id | Quantity | Total cost | CustomerName
And I will be required to do filtering on CustomerName (e.g. where CustomerName contains "Smith").
How should I go about this? Will the structure of the DBML be a factor?
Should it be a DBML with 2 tables in it
Orders -> CustomerDetails
or a DBML with a single 'table' in it, with the extra properties and I tell the select query on the domain services side to denormalise / populate those fields
e.g. The "new order" table in the DBML
Id
Quantity
Total cost
CustomerId
CustomerName