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
15
XamDataGrid DataRecord iteration very slow
posted

Hi

I have code that iterates records of DataGrid which is very slow. I have isolated the issue mainly to the line record.Cells[ColId].Value. 

foreach (var record1 in myXamDataGrid.Records)

{

  var record = (DataRecord)record1; // this line is slow

  var val = record.Cells[ColId].Value; // this line is very very slow

}

Is there an alternative way to do the iteration? 

Infragistics version 16.1.20161.1000

Thanks 

  • 30330
    Offline posted

    Hello Pinto,

    I have been investigating into the behavior you are seeing, and if you are looking to get all of the cell values for a particular Field in the XamDataGrid, the loop that you have provided is the way that I would recommend doing so if you are looking to go through the grid’s API rather than looping through your underlying data source.

    You have mentioned that this operation is rather slow though, and as such I have a few questions for you on this matter. Can you please provide some information on the following?

    1. Approximately how long is your application taking to complete this loop?

    2. How many records do you have in your grid?

    3. What is the configuration that you have for the XamDataGrid Field at your “ColId” in your code-snippet? For example, is this Field an unbound or alternate-bound field?

    Please let me know if you have any other questions or concerns on this matter.