10105 : I am using phGanttChart ActiveX in MFC application. I wish to store the GRID column number that was clicked for sorting. That I wish to remember the last sort… How do I do that??

Question

I am using phGanttChart ActiveX in MFC application. I have a registered version v3.5.5.70. I wish to store the GRID column number that was clicked for sorting. That I wish to remember the last sort… How do I do that??

Answer

You will need to trap the click in the column head and check if the column had SortEnable=true and remember the column index.

Implement IphGantX3.OnMouseDown, check that theSubComponent==gscGrid.

Find the cell if any; You can do this with IphGantX3,GetGridCellRect(x,0, out aTop: OleVariant; out aLeft: OleVariant;
                              out aBottom: OleVariant; out aRight: OleVariant); and check if the click was inside any of the header cell rects.

Leave a Reply