Hello,
I'm using XamDataGrid which contains about 9 bound and about 70 unbound fields. For CellValuePresenter I've created custom template(ControlTemplate), in which I have trigger. Trigger is bound to property in VM and to CellValuePresenter itself.
The issue is that when I scroll vertically CellValuePresenter changed for both types of fields (which I believe is expected behaviour). But during horizontal scroll only CellValuePresenters for bound fields is changed. I need this behaviour to change style of CellValuePresenter according to value in VM.
The workaround I've found yet is to either disable cell virtualization(which is horrible in terms of performance) or set CellContainerGeneration to LazyLoad (which is also not the best decision in terms of performance).
Is there any way to notify that CellValuePresenter has changed(because I believe it has)?
Hello Maksym,
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.
I am now preparing sample project which would describe my problem. Hovewer this may take some time as I switched to another task, which I need to finish
I am looking forward to hear from you.
Sorry for the long answer, it seems to be not connected to XamDataGrid. Anyway creating sample project was helpful for understanding that. Thanks
hi, please elaborate how you fixed it? My problem is similar but I can't fix it.
My scenario: I am using a xamgrid with AutoGenerateColumns=false, the grid has a few bound columns and 3 UnboundColumns, inside the unboundcolumns are textboxes for users to capture into, this is done on purpose becuase the textbox values are not part of the same dataset. When submit is clicked i can easily loop through all the rows and read the textbox values per row, all of this works fine.
Problem is: the xamgrid can show only 10 rows per screen, for the rest you need to scroll down. Scrolling is okay BUT when i scroll i realise that anything captured in the textboxes in the first 10 rows gets repeated into the rows below (i.e. anything captured in the textbox in row 1 is also put into the textbox in row 11, anything captured into the unboundcolumn's textbox in row 2 is also put into teh texbox in row 12, what is captured in row 3 when you scroll down will also appear in row 13, how strange!?).
This is very bizarre and unlogical. I don't know how to stop the grid from auto-copying values into rows that are out of sight (hidden and only visible when you scroll down). Any suggestions please?
Thank you for your post. I have been looking into it, but it seems like that I am missing something in your scenario, so if this is still an issue for you, could you please send an isolated sample project, where the issue is reproduced, so I can investigate it further for you.
Looking forward for your reply.