Note that there are some explanatory texts on larger screens.

plurals
  1. POObservation collection not updating when multibinding
    primarykey
    data
    text
    <p>I have a static <code>ObservableCollection</code> MarketList in ViewModel and it is bound to <code>Table</code> in following manner:</p> <pre><code>&lt;FlowDocumentScrollViewer Height="216" VerticalAlignment="Top" Margin="-7,2,7,0" &gt; &lt;FlowDocument&gt; &lt;Table CellSpacing="0" Name="MBPTable" &gt; &lt;Table.DataContext&gt; &lt;MultiBinding UpdateSourceTrigger="Explicit" Mode="TwoWay" Converter="{StaticResource indexerConverter}"&gt; &lt;Binding Path="MarketList" UpdateSourceTrigger="PropertyChanged" NotifyOnSourceUpdated="True" Mode="TwoWay" BindsDirectlyToSource="True" /&gt; &lt;Binding Path="MBPindex" Mode="TwoWay" /&gt; &lt;/MultiBinding&gt; &lt;/Table.DataContext&gt; &lt;Table.Resources&gt; &lt;local:IndexerConverter x:Key="indexerConverter"&gt;&lt;/local:IndexerConverter&gt; &lt;/Table.Resources&gt; </code></pre> <p><code>Table</code> contains <code>ListView</code> which is bound to Property of MarketList.</p> <pre><code>&lt;ListView Name="MarketByPriceList" Width="300" ItemsSource="{Binding MarketByPriceList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" AlternationCount="2" Margin="0,15,0,0" &gt; &lt;ListView.View&gt; &lt;GridView&gt; &lt;GridViewColumn Header="Orders" Width="48" DisplayMemberBinding="{Binding MBP_NoofBuy_Orders, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" &gt;&lt;/GridViewColumn&gt; &lt;GridViewColumn Header="Bid Qty" Width="48" DisplayMemberBinding="{Binding MBPBID_Qty, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" &gt;&lt;/GridViewColumn&gt; &lt;/GridView&gt; &lt;/ListView.View&gt; &lt;/ListView&gt; </code></pre> <p>This Is Convertor Method</p> <pre><code> public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (values != null &amp;&amp; values[0] != DependencyProperty.UnsetValue) { // ObservableCollection&lt;GlobalItems.Model.MarketWatchModel&gt; allNames = (ObservableCollection&lt;GlobalItems.Model.MarketWatchModel&gt;)values[0]; int index = (int)values[1]; return GlobalItems.ViewModel.MarketWatchModelView.MarketList[index]; } else { return null; } } </code></pre> <p>Binding works fine but update in collection is not reflected in UI</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload