How to create a custom field when using WCF RIA?
I have a table with "first name" and "last name". When binding to a datagrid I need to have a column named "name", which is "first name" + SPACE + "last name".
I am using a DomainDataSource tag in XAML, is there any method to bind a column "first name" + SPACE + "last name"?
Is there any method like defin开发者_开发百科ing a class to have for the table in EDMX?
Public string fullname { get { return firstName+"_"+lastName; } }
Thanks.
I'm not 100% certain I understand the problem, but a couple solutions come to mind:
- Your query against the database can return a virtual column or
- You can add a view to the db with the name column created out of the first and last or
- You can give your business object a name property that would be set from the first and last and would get the full name
-jesse
Finally, I added a xxxxx.shared.cs
to added a column to return to client side.
精彩评论