Hi,
In my scenario i do not want virtualization on and hence I have switched it off by wrapping grid in scrollviewer, the performance is good when i am scrolling but the moment I add conditional formatting (via code behind) i see the scrolling is very slow. I used JetBrains dotTrace and windbg and can see the grid is recycling cells (See attached symbol). Can you please explain why this is so, the reason i turned off virtualization is because i have limited number of data rows (around 2000) and i do not want virtualization enabled.
similarly when i update the underlying data property, i see the below function slows down the UI phenomenally. As i mentioned there is no virtualization, the view port is very small, around 2000 rows and only 30 rows are visible with 10 columns. The performance etc is great when conditional formatting is not enabled, it works like a charm, but the moment i enable conditional formatting the whole grid struggles.
I see in the below stack trace, it is compiling dynamic delegate which is slowing down, is there any work around to improve the performance. The reason we choose xamgrid was because we expected performance would be better but this is not the case.
Appreciate your help.
THanks,
Rohit
Hello Rohit,
I have been looking into your issue and when enabling conditional formatting in the XamGrid positioned in a ScrollViewer, the scrolling works fine on my side. I am attaching a sample application() that I used for my tests. Could you please try the sample on your side and modify it if needed ? Also could you please tell me the version of our assembly files that you use like 11.2.20112.2316
Looking forward to hearing from you.
I am sorry, but as per the documentation this is to be applied per row not "rows" across the grid.
So you are saying - If i have 2000 rows on my grid and row level conditional formatting is applied, and I add one row, we are going to repaint all rows/cells across the grid? If i am adding one row why are other row's cell style is being re-applied? Seriously, does it sound right to you? Because of this the entire core is maxed out when i add just one row.
Could you please double check this behavior with your development team. This sounds more like a design issue/bug to me rather "by design" behavior.
Alternatively: how can i apply row level conditional formatting to the newly added row to the grid (without repainting all the cells)?
The conditional formatting is applied on a column and it evaluates all the cells in this column / all rows. Currently your cannot create a conditional formatting that can be applied only on specific row. If the ‘ShouldRefreshOnDataChange’ property is set to “true”, it makes the rule to be reapplied if the data is changed and this makes the delay in your scenario.
Let me know, if you have any other questions on this matter.
>> If the ‘ShouldRefreshOnDataChange’ property is set to “true”, it makes the rule to be reapplied if the data is changed and this makes the delay in your scenario.
I am sorry but i think this is pretty obvious from the sample that i created, there is nothing new you are telling me here.
I cannot go and explain this to my business users (around 150+ around the globe) that as vendor library repaints all the cells + spikes CPU, we cannot refresh the cells, it is better if i hand over my resignation letter to them. I cannot explain but believe me conditional formatting is very important in my scenarios so cells could stand out.
I used xamgrid as it was developed for performance out of the box, and if i cannot apply a style to a new row without spiking up cpu then xamgrid is of no use to me.
I very well comprehend and understand that this is a limitation and not currently supported, all i am asking for is to know how long would it take to get it fixed so that if needed i can swtich to other vendors. So my question is to know if the developement team is anytime going to work on this or should i evaluate other vendors? personally this is a basic feature and i cannot push you enough to have it, appreciate honest comments.
Thanks so much,
I have contacted our development team about more information on this matter and they will do the best to modify the reported behavior for our upcoming Service Release.
Thank you for understanding.