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

Copy multibound DatagridTextColumn value to the clipboard?

$
0
0

Hi, 

I'm having a strange problem with copying from a datagrid text column to the clipboard.

This is my binding for the column:

<DataGridTextColumn Header="Yield"                                         
    Width="120"
    ElementStyle="{StaticResource RightAlignStyle}"><DataGridTextColumn.Binding><MultiBinding Converter="{StaticResource ScaledOrNormalPath}"><Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type local:ChartControl}}" Path="ViewModel.Series.Count"/><Binding Path="Yield" StringFormat="'{}{0:,0.######}%'"/><Binding Path="ScaledYield" StringFormat="'{}{0:,0.######}%'"/></MultiBinding></DataGridTextColumn.Binding></DataGridTextColumn>

I have other columns in the grid that don't use multibinding and those are getting put on the clipboard.

I'm not seeing any binding errors and the data is displayed in the grid.

I tested by looking at the CopyingRowClipboardContent event and it confirms that the item of the DataGridClipBoardCellContent.Item of the missing values is bound to the correct item but the DataGridClipBoardCellContent.Content property is null.

Is there any way I can modify this from codebehind (the Content property is read-only)?

Thanks,

  nisbus


Thanks, nisbus


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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