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
355
Performance issue while accessing UltraGridBand.GetRowEnumerator() method
posted

Hi,

        I want to access all the rows from the band. For that i am calling UltraGridBand.GetRowEnumerator(). But it is taking long time for first time. Next time it isloading quickly. this is my sample code.

 

 

 

 

 

 

 

 

 

Utils.LogTimer("Enumerator Creation"

);

System.Collections.

 

IEnumerable

rowEnumerator = ultraGrid1.ActiveRow.Band.GetRowEnumerator(rowType);

 

 

Utils.LogTimer("Enumerator Created"

);

 

 

Utils.LogTimer("Dummy Loop Starting"

);

 

 

foreach (UltraGridRow ugRow in

rowEnumerator)

{

 

 

continue

;

}

 

 

Utils.LogTimer("Dummy Loop End"

);

In the logger, i got this result

Dummy Loop Starting  :20091103_04_12_30_750
Dummy Loop End  :20091103_04_13_39_296

It is almost taking more than 1 min.

Is there anyway to improve the performance? Kindly help me out for this issue

Thanks,

S.Santhanamahalingam.

  • 469350
    Suggested Answer
    Offline posted

    My guess is that the performance problem here is not caused by the grid, but rather by the DataSource. This is supported by the fact that is works faster after the first time.

    Retrieving the child rows from any particular parent row in the grid can be an expensive operation - depending on the DataSource. The DataSet class is particularly performance-intensive for this. Are you using a DataSet?

    You might want to check out the WinGrid Performance Guide and see if there is anything there that might help you. Also, there is a follow-up discussion to the guide (Wingrid Performance and DataSources - Infragistics Forums) that specifically discusses data sources and performance.