views:

85

answers:

2

I have a table that have "first name" and "last name", when binding to a datagrid, I need to have column named "name", which is "first name" + SPACE + "last name"

As I using domaindatasource tag in xaml, any method to bind a column "first name" + SPACE + "last name"?

Is there any method like define a class to have for the table in edmx

Public string fullname { get { return firstName+"_"+lastName; } }

Thanks.

A: 

I'm not 100% certain I understand the problem, but a couple solutions come to mind:

  1. Your query against the database can return a virtual column or
  2. You can add a view to the db with the name column created out of the first and last or
  3. 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

Jesse Liberty
A: 

Finally, I added a xxxxx.shared.cs to added a column to return to client side. Thanks anyway

Jay