I have a grid with more records than can be displayed. The first element in the grid is XamCheckEditor. When I scroll away from me, it checks the current record, when I scroll toward me it unchecks the current record. I don't want the scroll wheel changing any data. Is their a property that I'm missing?
Hello,
I have been looking into your post and I have been trying to reproduce your issue with no success. Would you please provide me with an isolated sample application where this issue occurs in order to be able to provide you with more accurate assistance.
I am looking forward to hearing from you.
Thanks for the replies, I attached a sample. After I seriously simplified the problem I'm positive that the problem is in the event that gets fired. Anyways this clearly states the problem that I'm having. I'm open to suggestions.
Thanks.
Apparently the ValueChanged event is being fired even when the value is not changing. This is what’s causing the problem. Is there a work around? Should I open a ticket?
The attached project, Scrolling2.zip, seems to solve the problem of values getting changed when scrolling. The key seems to be the setting
RecordContainerGenerationMode="PreLoad"
However this was causing problems with the way I was binding the ItemsProvider for the XamComboEditor. There are still more value change events than I would expect and I don’t quite understand what was wrong with my original approach, but this works for now.
Should have said this works for me. This may well not solve air1kdf’s original issue.
Hello curtruffing,
I have been looking into your posts and I can suggest looking through the following forum post where it is explained what exactly the different values of the “RecordContainerGenerationMode” property mean:
http://blogs.infragistics.com/forums/t/48307.aspx
I can suggest using bound field instead of unbound field and setting the ‘SelectedItem’ in the Style for the ‘EditorStyle’ as :
<Setter Property="SelectedItem" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type igDP:CellValuePresenter}}, Path=Value }"/>
Also you can use the command in some event like ‘InitializeRecordDirect’:
xamDataGrid.ExecuteCommand(DataPresenterCommands.CommitChangesToAllRecords) to remove the icons that appears when you change the value in a XamComboBox.
I tried to apply these suggestions but they seemed to exacerbate the problem. With these in place the values change even when I use RecordContainerGenerationMode set to PreLoad. Can you upload the project where the values are not being changed when scrolling?
This works. Thank you Yanko.
I have been looking into your post and I am sending you a modified version of your project(ScrollingModified.zip).
If you need any further assistance, do not hesitate to ask.