I am running the ANTS profiler on my application and my code seems to be spending a lot of time on a line of code where I try to determine if a particular column exists on a row in the grid. I am currently using e.Row.Cells.Exists(XXX) where XXX is the column name. Is there a faster way to do this?
Hello,
The Exists method on the CellsCollection is inherited from our base collection class, so it would be looking for an UltraGridCell and not a column. Instead, you can use e.Row.Band.Columns.Exists(xxx).
Please try this out and let me know whether it improves the application's performance.
I misspoke. My code will get a cell and I can get the column from that cell. Just wondering if there is a better way to do this. Sounds like EXISTS is the way to go?