Forum Discussion

nh512613's avatar
Occasional Contributor
2 years ago

Accessing Grid Cells in Delphi grids is very slow



I need to read a lot of values ( over 1000 rows and over 20 columns) in a custom grid we are using in our application, the access is working with the property "Content" at the grid other properties like "wValue" don't work. However accessing these grid data takes a too long time to actually work with big grids (10 rows need 12 seconds to only read and save with no other operation). Is there a way to access a complete row instead of each cell? I already tried the "Rows" property but this returns an object which doesn't have the text in it.

The function I wrote to read a grid looks like this:


function getGrid(Grid)
  var GridExpectation = []
  for(rows = 1; rows <= Grid.RowCount; rows = rows + 1)
    arr = [];
    for(columns = 0; columns <= Grid.ColCount - 1; columns = columns + 1)
    GridExpectation[rows] = arr;
  return GridExpectation;



No RepliesBe the first to reply