enveetee
11 years ago
Hi
I am having issues with ResizeColToFillSpace

I have 20 columns which the user can hide / reorder at will. Sometimes the last column is not visible

How should I implement ResizeColToFillSpace? Do I have to find the last visible column like this:

Dim Cols&
For Cols = iGrid1.ColCount To 1 Step -1
   If iGrid1.ColVisible(Cols) = True Then
      iGrid1.ResizeColToFillSpace (Cols)
      Exit For
   End If
Next Cols


'Im a running this code everytime the user:
Resizes grid
Reorders columns
Changes column widths
Changing the visiblity of columns

..or is there a better way
Igor/10Tec
11 years ago
You deinitely need to find the last visible column by yourself as the ResizeColToFillSpace method requires the index of a column, but in the general case this is not the last visible column.

Perhaps, you can get the last visible column using less code using an expression like this:

iGrid1.Sys(igSysColsLastVisCol)
Users browsing this topic