Friday, September 21, 2012

How to find the location of the variable on which bind data column?

How to find the location of the variable on which bind data column?

How to find the location of the variable on which bind data column? A simple search on SOLUTION fails.

<sdk:DataGridTextColumn MinWidth="15" Binding="{Binding Accounts[0].AccountValue, Converter={StaticResource DecimalConverter}}"                           CanUserSort="False"                           CellStyle="{StaticResource RightAlignCellStyle}"                           Header="Account Value"                           HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyleRight}"                                             IsReadOnly="True" /> 

Answers & Comments...

Answer: 1

Find out where the DataContext is set. It can be on the object itself, or any of its parents. The variable Accounts should be a property of the DataContext object.

by : Kshitij Mehtahttp://stackoverflow.com/users/773885




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog