Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
255
WinGrid Accesses underlying Data Class properties many times
posted

Hello,

I recently built a custom class with about 50 properties and bound a List(of My_Property) to a WinGrid. The performance was excruciatingly slow, and after some research I found out that the ultragrid keeps running the code to get the property from the underlying class, even though there hasn't been any changes. I put a Debug.Print statement in one of the properties in my class, and found that the property is calculated twice just when I scroll the WinGrid. Is there any way to tell the WinGrid to only run the property calculation when the grid is initially loaded, and when I explicitly tell it to, rather than having it calculate whenever it feels like it?

Thank you in advance.

 

P.S. I'd like to avoid using datatables as a datasource since some of the calculations I need to perform in the Data Class is too complex for the datatable's Expressions.