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
947
Question about UseOptimizedDataResetMode
posted

Hi,

I am currently using grid with Load-On-Demand setting, and I am also using IBindingList as a data source.

 And, I saw this option "UseOptimizedDataResetMode" in Grid.

Is it possible to know any detail about this in terms of what improvements it give?

 Moreover, in order to benefit this, do I have to always raise my initial add from IBindingList as Reset? I often need to clear my grid, and re-populate with the data that already exists in IBindingList (kind of cached). So, it's simply clearing grid of old data, and just repopulating grid with different queries to IBindingList.

 Thanks

  • 37774
    posted

    It only makes sense to enable this property if your IBindingList has an efficient implementation of the IndexOf method (i.e. doesn't perform a linear search).  If you enable this, the grid will use a more efficient lookup mechanism for determining if an object has already been created for the row or if it needs to create a new one, but this will be much slower if the IndexOf operation is inefficient.

    As for manually raising a Reset on your initial add, this property will only come into play if the grid has already been initialized with data, so if the Rows count of the grid is 0, this property is not checked.

    -Matt