سؤال

I have a WPF DataGrid with DataGridTextColumn

<DataGridTextColumn Header="Grouping" Binding="{Binding Value.GroupIndexPlusOne, UpdateSourceTrigger=Explicit, Converter={StaticResource StringToIntConverter}}" CanUserSort="False" Width="Auto" Utilities:IsReadOnlyDpAttachable.IsReadXOnly="{Binding Data.GroupingIsReadonly, Source={StaticResource proxy}}" />

Despite having set the UpdateSourceTrigger to Explicit in order to do the actual update from code, the moment I change the value in the column, the source still gets updated.

The source is a ListCollectionView wrapping a ObservableCollection<KeyValuePair<string, LayoutColumn>>.

It makes no sense, what am I missing?

هل كانت مفيدة؟

المحلول

i m not sure you can really set the binding you want for a DataGridTextColumn. (sorry i cannot find 'proof'). Try with a TemplateColumn that you build on your own.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top