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
425
Wingrid performance when modifying records in a hierarchical data structure
posted

Hi,

I have a dataset that can have 10+ datatables with data relations between all of them (table 1 which is a parent to table 2 which is a parent to table 3, etc).  I bind it to a wingrid and am able to navigate it by expanding it level by level etc, just fine.  For the most part, I can modify fields in rows in the grid without problem as well.  However, there is a very peculiar case where if I modify a field in the first child row of a particular parent row, and there are at least 8 levels below it, then CPU utilization goes to 100% for a long time.  The more levels below, the longer it takes to where it will never complete.  The activity appears to be in the datasource, i.e. doing a Break All and looking at the stack trace, it is in the area of System.Data.DataView, System.Windows.Forms.RelatedCurrencyManager.ParentManager_CurrentItemChanged etc, but not in anything Infragistics.

 

Thanks,

Bill

Parents
  • 469350
    Offline posted

    Hi Bill,

    I doubt this is specifically a grid issue. The BindingManager in DotNet isn't very efficient, especially with very deep hierarchies like this. Personally, I recommend keeping the depth of your grid to between 5 and 8 maximum. Anything more than that and the BindingManager will start to choke.

    Realistically, no human user can deal with 10 levels of data hierarchy, anyway.

    You could try wrapping your data source in a BindingSource, if you are not already doing so. Sometimes that helps, but not always.

    You could also try setting the SyncWithCurrencyManager property on the grid to false. That way the grid doesn't synchronize the active row with the position of the BindingManager, which can be a very expensive operation in a deep hierarchy. This assumes that you are not binding other controls to the same datasource and need to keep them in synch with the grid.

Reply Children