DataGrid REALbasic Plugin |

# DataGrid.ReQuery Method

This method is used do a ReQuery on the DataGrid. This method does the same as setting the Rows property to a new value, except this method gives control over if static rows should be preserved or not.

ReQuery(
rowCount as Integer,
clearStaticCache as Boolean)

#### Parameters

rowCount
  The new count of rows.
clearStaticCache
  If set to true then the static cache is cleared, if set to false then static rows are preserved.

#### Remarks

Static Rows are rows that are stored in memory instead of only cached while displayed on the screen like the DataGrid usually does. There can be many reasons for using static rows, one purpose for example would be when a user clicks a checkbox in a row then the row would be changed to a static row, so that the new value of the checkbox will be stored after the row gets scrolled out of scope, and without having to do a requery. Then when you are ready to save the new states to the database then you can use the GetStaticRows function to get the index of all those rows which have been modified in such way.

#### See Also

DataGrid Control