I'm using the XamDataGrid to show and change my hierarchical business objects.
One of my fields looks like this:
<igDP:UnboundField Name="Size" Label="My Size" x:Name="fldSize" Width="Auto"> <igDP:UnboundField.Settings> <igDP:FieldSettings AllowEdit="False" EditorType="{x:Type igEditors:XamTextEditor}"> <igDP:FieldSettings.EditorStyle> <Style TargetType="{x:Type igEditors:XamTextEditor}"> <Setter Property="Value"> <Setter.Value> <MultiBinding Converter="{StaticResource SizeToDimensionsStringMultiConverter}"> <Binding Path="Record.DataItem.Size.Width" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type igDP:DataRecordCellArea}}"/> <Binding Path="Record.DataItem.Size.Height" RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type igDP:DataRecordCellArea}}"/> </MultiBinding> </Setter.Value> </Setter> </Style> </igDP:FieldSettings.EditorStyle> </igDP:FieldSettings> </igDP:UnboundField.Settings> </igDP:UnboundField>
If I scroll through my data records (vertical direction) randomly the value (e.g. Size) of some records is beeing set although I haven't changed anything.
How is this possible? What can I do to stop this behaviour?
Hi,
in your sample you are just setting the value within the combobox but not in the bussinesobject.
Looking forward for your reply.
Darius
Hello Darius,
I have modified the sample you have sent me, so now it works as you want. Basically instead of setting the SelectedItem of the XamCombopEditor, I set its Value. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Hello Stefan,
sorry that it took me so long to reply, but I have been busy with other projects.
The Problem remains even in the new 12.2 Version.
I added another Solution.
I think the problem has something to do with the virtualization of the data records.
Situation 1):
I load just as many records into the DataGird so that the DataGird doesn't need a scrollbar.
Now I change the height of the window to get a scrollbar.
Everything is fine. I can scroll through the DataRecords and the properties remain the same.
Situation 2):
I load some more records into the DataGrid so that the DataGrid shows the scrollbar automaticaly.
The height of the window stays the same.
Now if I scroll through the DataRecords the DataGird writes values back to my bussinesobjects even though the values havent't changed. This happens only if the bounded property has a TwoWay binding. So far it's just a performace issue. The worst thing that happens is that the values that are writen back to the objects don't belong to these objects. It seems to me that the values come from an adjacent record.
Sincerly,
I am just checking if you were abel to modify the sample, so I can investigate it further for you.
your solution works in the sample project, but not in my real project. I will modify the sample project as soon as I can and post it.