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
365
Prevent InitializeRow until row is displayed?
posted

Hi All,

I've got a ultrawingrid with a LOT of rows.  I seem to recall somewhere that there is a grid property that prevents InitializeRow from firing until the grid row is visible and/or about to be displayed?  Is there a property that does this or did I imagine it?

I have an unbound column in the source DataTable that needs to be calculated based on the contents of two other columns in the DataRow.  The calculation can be time consuming that I would like to avoid calc'ing the entire column when the grid is bound...

Thanks for the help.

Corey.

  • 469350
    Suggested Answer
    Offline posted

    Hi Corey,

    I'm not sure if this will work, but you can try this:

    this.ultraGrid1.DisplayLayout.LoadStyle = LoadStyle.LoadOnDemand;

    I say I am not sure, because I think the grid loads the root-level rows all at once, anyway. And even if it doesn't load them all by default, it will still be forced to load everything if you sort, filter, group, or have a summary.

    Another option might be to use CalcManager with a formula instead of using InitializeRow. The CalcManager is optimized to perform calculations on the visible cells in the grid first, so this will make your application more performant.