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 air1kdf,
I have been looking into your post and I assume that by these two lines of code you would like to assure that the value of the activated record will be changed when its XamCheckEditor is checked/unchecked. This is usually not necessary because it is part of the built-in functionality and the value will be changed automatically when the particular XamCheckEditor is checked/unchecked.
As I mentioned above, declaring the Style implicitly(without a key) makes the event fire for all XamCheckEditors and when you are scrolling the Content of the Label changes multiple times and this causes the unexpected behavior.
If I misunderstood the purpose of your implementation in the event’s body, please explain us what exactly you would like to achieve.
This works. Thank you Yanko.
Thanks for looking at it, and creating a ticket.
I can't agree with your reasoning. If I don't select a record the state doesn't change. This is contradictory to what you are saying about them getting created in and out of view.
FYI those 2 lines just update the boolean value. I'm sure not the best way, but it works. Commenting out those 2 lines has zero impact on the event. Thus it's not re-firing the event.
I'm just learning WPF, so it's all new to me. I am not the expert, and could very well be wrong about the event handling. Right now I just need to make it work.
Hello curtruffing,
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.
I have created a supported ticket for you : CAS-84668-8N1KHC.
I have been looking into your posts and the reason, that the ValueChanged event is firing multiple times, is because it fires for all the XamCheckedEditors. This is so because the style has been implicitly created (without a key). This way when a new cell is scrolled into view a visual element (XamCheckEditor) is being initialized for it and its value is being set. This is why the label changes its Content without the selected XamCheckEditor changing its state.
I was wondering what exactly is the purpose of the two lines of code that I have suggested removing because it seems that they make the selected check box change its state ?
I am looking forward to hearing from you.