Stats

Fast Ensure Visible for CGridCtrl

This tip shows a very fast algorithm (with some constraints enforced for it to work) to EnsureVisible a row in CGridCtrl by Chris Maunder

Introduction

In one of my projects, I had to load around 200000 rows in the CGridCtrl and then had to provide the functionalitiy of EnsureVisible to scroll to and highlight a row. So I had to come up with a reasonably fast algorithm.