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
4133
What Is The Fastest Way To Tell If A Column Exists?
posted

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?

Parents
  • 12480
    Offline posted

    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.

Reply Children