10302 : I need to know the rownumber of the created row to fill the gridcells?

Question

I am using your Gant Time Package with grid under VFP9.

When i’m adding a new row with Thisform.phGantX1.AddDataEntityTree(de) i need to know the rownumber of the created row to fill the gridcells with Thisform.phGantX1.gridcellValueSet(x,row,”test”,0)…

How can I do it?

Answer

On the IphDataEntity_Tree2 interface there is a property called GridRowIndex. Go like this:

Dim tn As IphDataEntity_Tree2

  Set tn = Thisform.phGantX1.AddDataEntityTree(de)

  phGantX1.GridCellValueSet 2, tn.GridRowIndex, “v1”, -1

 

Leave a Reply