Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

WPF DataGrid: How to perform column binding using code behind?

$
0
0

This is the column in question:

<DataGridTextColumn
    Header=" Length "
    Width="Auto"
    Binding="{Binding Path=Length, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat=0.00;;#}"
    ElementStyle="{StaticResource RightJustified}"
    x:Name="lengthColumn"></DataGridTextColumn>

The problem is that I need to bind that column to some other property (called Length48) at run time.

TIA.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>