Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
Edit an UnboundColumn using a IMultivalueConverter
posted

In my project I am using the xamgrid with some UnboundColumns.
In reading mode I have no issue. But I cannot ge the edit mode to work.
If I simply needed a IValueConverter I could get thigs to work following the sample provided but, for various reasons, I need to use a IMultiValueConverter instead.
This IMultiValueConverter need to take in the datacontect (UnboundDataContext) or the ColumnKey at a minimum.


FOr the EditorTemplate I started with the sample provided in your website below:
<DataTemplate x:Key="Sample">
<StackPanel Orientation="Vertical">
<Slider x:Name="slider1" SmallChange="1" LargeChange="1" DataContext="{Binding RowData}" Value="{Binding TestProperty, Converter={StaticResource subPropertyColumnConverter}, ConverterParameter={RelativeSource Self}}" />
<TextBlock Text="{Binding Value, ElementName=slider1}" HorizontalAlignment="Center"/>
</StackPanel>
</DataTemplate>

This compiles and "works" except that I would not enough information passed into the converter to do what I need

so I changed it to:

<DataTemplate x:Key="SampleTest">
<StackPanel Orientation="Vertical">
<Slider x:Name="slider1" SmallChange="1" LargeChange="1" DataContext="{Binding RowData}">
<Slider.Value>
<MultiBinding Converter="{StaticResource subPropertyColumnMultiConverter}">
<Binding Path="DataContext" RelativeSource="{RelativeSource Self}"/>
<Binding RelativeSource="{RelativeSource Self}"/>
</MultiBinding>
</Slider.Value>
</Slider>
<TextBlock Text="{Binding Value, ElementName=slider1}" HorizontalAlignment="Center"/>
</StackPanel>
</DataTemplate>


But I constantly crash.

Can you please provide a sample that shows how to edit an unboundcolumn using an IMultiValueParameter?

Thank you.

Parents
No Data
Reply
  • 6365
    Offline posted

    Hello,

    Thank you for the code-snippet you have provided.

    It seems that the question you are having is the same as the one you have at the following thread, to which I have already replied.
    I will continue updating you on this matter through the referenced thread.

    Thank you for using Infragistics components.

Children
No Data