FlexcellGrid menu popup


I want to be able to click on a FlexcellGrid cell and have pop up menu appear.

When the menu item is selected I want to retrieve the following things... cell contents, Col and Row, and sheet ID/name.

What's the best way to do this?



She sheet properties you can get them from the attached FlexCelImport component:
SheetID := Grid.FlexCelImport.ActiveSheet;
SheetName := Grid.FlexCelImport.ActiveSheetName;

The col and row you get them from the grid, since FlexCelGrid is a standard  TCustomGrid. So you have:

Row := Grid.Row;
Col := Grid.Col;

And lastly, having the row and the col, you can find the contents using the attached FlexCelImport:
Cell := Grid.FlexCelImport.CellValue[Grid.Row, Grid.Col];

In general, any information you need about the file, you can get it form the FlexCelImport attached to the grid. The grid itself doesn't store the data (so it isn't stored twice), all the data is in the FlexCelImport. (Except of course current row and col, because those are a part of the TCustomGrid definition, and also they aren't stored in FlexCelImport).