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
830
Slow Bind To Grid
posted

Ihave an UltraGrid which is populated form a collection of Custom objects where each object in the collection is a custom object called BLDepartment which itself contains properties of custom objects within it. The code to do this is:


this.AllDepartments = BLDepartment.GetDepartmentsFromManagerPersonId(BLPerson.LoggedOnPerson.PersonId);
this.bLDepartmentBindingSource.DataSource = AllDepartments;
this.bLDepartmentUltraGrid.DisplayLayout.LoadStyle = Infragistics.Win.UltraWinGrid.LoadStyle.LoadOnDemand;
this
.bLDepartmentUltraGrid.DisplayLayout.MaxBandDepth = 3;
this.bLDepartmentUltraGrid.DataSource = this.bLDepartmentBindingSource;

The code hangs for a very long time (about 3 minutes) on the last line. I assume this is because as the grid is binding to the collection, it is going into evey public property of every BLDepartment object in the collection. If this is the case is there a way to stop this hapenning and so improve performance ?

Any help greatly appreaciated.

John

 

 

Parents
  • 469350
    Offline posted

    Hi John,

    jvinnell said:
    I assume this is because as the grid is binding to the collection, it is going into evey public property of every BLDepartment object in the collection.

    No, I don't think so. The grid doesn't do that. I will loop through all of the rows at the root level, but it's not going to access every property. My guess would be that your MaxBandDepth is somehow getting reset and the grid is, in fact, walking down beyond level 3. Try checking the MaxBandDepth property after you set the DataSource to see if it's still set to 3.

    If that's not the issue, then I'll need more information. If you could post a small sample project demonstrating the issue, that would be the best thing and I could tell you exactly what's taking so long.

    If not, then the structure of the BLDepartment would be helpful. Also, the number of rows in the list would be good to know.

Reply Children