CDCDCD
2018-07-02T13:58:34Z
How can I get a column's index from its name? With a datagridview you would do
MyDataGrid.Columns("Col3").Index

When I try to do that with iGrid I get an "Invalid Key"


fGrid.Cols.Add("RowNum")
    For i As Integer = 0 To 50
      With fGrid.Rows.Add
        .Cells("RowNum").Value = i
      End With
    Next

Thanks
CD
CDCDCD
2018-07-02T14:02:25Z
Just figured it out. I needed to add:

With fGrid.Cols.Add("RowNum")
.Key = "RowNum"
End With
Igor/10Tec
2018-07-02T15:42:44Z
The overloaded version iGrid.Cols.Add(<String>) creates a new column with the specified column header text but not key. Your solution is ok, but we can suggest a shorter version. Use the following overloaded version of the iGrid.Cols.Add method:

fGrid.Cols.Add("RowNum", "Row Number")

The first parameter is the column key, the second parameter is the column header text.