I wonder if there is a way of concating two strings in Silverlight inside xaml file. I have a DataGrid where one of the columns is ‘Default Contact’ and I would like to represent data in there as first and last name.
<sdk:DataGridTextColumn Header="Default Contact"
Binding="{Binding Path=DefaultContact.FirstName}" />
I was thinking about something like:
Binding="{Binding Path=DefaultContact.FirstName + " " + DefaultContact.LasttName}"
But this doesn’t work. I don’t even know if this is possible to achieve. Seems like really basic thing so I hope it is supported in some way.
Any help would be greatly appreciated.
You could use a DataGridTemplateColumn and have both your first and last name in the template. Something like this: