Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DataBinding issue from datagrid

4 views
Skip to first unread message

E

unread,
May 15, 2009, 12:01:02 PM5/15/09
to
<Style TargetType="{x:Type xcdg:DataCell}">
<Setter Property="ReadOnly" Value="False" />
<Setter Property="Background" Value="White" />
<Style.Triggers>
<DataTrigger Value="True" >
<DataTrigger.Binding>
<MultiBinding Converter="{StaticResource equalsConverter}">
<Binding RelativeSource="{RelativeSource FindAncestor,
AncestorType={x:Type local:TuneOil}}" Path="BubblePointPressureTB"
diag:PresentationTraceSources.TraceLevel="High" />
<Binding Path="OilPvtBubPtPres"
diag:PresentationTraceSources.TraceLevel="High" />
<Binding RelativeSource="{RelativeSource Self}"
Path="ParentColumn.Index" diag:PresentationTraceSources.TraceLevel="High" />
</MultiBinding>
</DataTrigger.Binding>
<Setter Property="ReadOnly" Value="True" />
<Setter Property="Background" Value="AliceBlue" />
</DataTrigger>
</Style.Triggers>
</Style>

I have this DataTrigger on a Datacell. I cannot seem to get the first
Binding correct to send the data to the MultiBinding Converter. The first
Binding is trying to get data from this Window called TuneOil and get data
from the BubblePointPressureTB. i can't get it.

I have also tried to Name this Window x:Name="PVTTuningScreen" and have used
it as an ElementName to get to either the TextBox or a Property in the code
behind. I can't get that to work either. the other two bindings work fine.
I even tried using an ElementName="PVTTuningScreen" and set the Path to a
DependencyProperty but that doesn't work either. It doesn't get the real
data. Can someone suggest anything I can do?

Ed

--
Ed

0 new messages