This is a migrated thread and some comments may be shown as answers.

[Solved] datamemberbinding with condition

1 Answer 120 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
guy
Top achievements
Rank 1
guy asked on 27 Jul 2011, 04:19 PM
hi,
i need to fill a column of gridviewcolumn with condition :
(if field A is Null use field B )

how can i do it using xaml

the current:
DataMemberBinding = "{Binding A}"

i need somthing like this
DataMemberBinding = "{Binding (A == Null ? B : A)}"

thanks

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 28 Jul 2011, 06:28 AM
Hi Guy,

You should do this in your business object / view model by creating a new read-only property which will return this thing. Then simply bind the column to this new property.

Regards,
Ross
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
GridView
Asked by
guy
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or