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?
I know this query was logged and resolved a long time ago but I recently had the same problem and my solution is completely different - the scrolling bug is actually related to an underlying problem in silverlight: the silverlight datagrid has built-in scrolling but the grid will reinitialise each row every time you scroll, resulting in invalid duplication of textbox/checkbox values in your grid (i think it copies textbox values with an ordinal reference such as row0 and row1 depending on what is visible after scrolling rather than an actual row reference). This can be resolved by removing scrolling from your grid and wrapping your grid in a <scrollviewer>
Hello,
Thank you for your feedback. I believe that other community members may benefit from this as well.
Thanks again.