Adding a column to a grid at the left-most position
The Grid control doesn't support adding columns at position 0. To work-around it, use this code:
Author: grid.SelStartRow = 0 grid.SelStartCol = 0 grid.SelEndRow = grid.Rows - 1 grid.SelEndCol = grid.Cols - 1 ' Save Grid data grdClip = grid.Clip grid.Cols = grid.Cols + 1 ' Restore Grid data one column to the right grid.SelStartCol = 1 grid.Clip = grdClip grid.Refresh ' By here you got a new first blank column (col = 0) and it shouldn't be slow! |
||
Editor: Last update: 2024-11-08 Copyright 1995-2024 VBI |