Objective Grid: Determining the last filled row in a column

Article ID: 423
Last updated: 27 Apr, 2018
Article ID: 423
Last updated: 27 Apr, 2018
Revision: 3
Views: 1634
Posted: 09 Jan, 2001
by Meltreger B.
Updated: 27 Apr, 2018
by Meltreger B.

Problem

 


What is the fastest way to determine the last filled row in a column?

 

 


Cause

 


 

 


Action

 


The fastest way to determine this is to prepare the information when the grid is filled. You could maintain an array of high-water marks where you store the last column for each column.

Every time you or the user changes cells in the grid, StoreStyleRowCol() is called. So, you should override StoreStyleRowCol() and increase the high-water-mark for the specific column if necessary.

Take care if rows are removed or inserted:

  1. When rows are removed StoreRemoveRows() is called.
  2. When removing rows is undone StoreInsertRows() is called.

Override these two methods and adjust the high-water-mark.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 423
Last updated: 27 Apr, 2018
Revision: 3
Views: 1634
Posted: 09 Jan, 2001 by Meltreger B.
Updated: 27 Apr, 2018 by Meltreger B.

Others in this category