10872 : If I a timeitem by clicking it how can i the coresponding row in the grid?

Question

If I select a timeitem by clicking it how can i select the coresponding row in the grid?

Answer

Implement OnTimeItem_SelectionChanged and go like this:

    private void gantt1_OnTimeItem_SelectionChanged(PlexityHide.GTP.Gantt aGantt, PlexityHide.GTP.TimeItemEventArgs e)
    {
      if (e.TimeItem.Selected)
      {        
        gantt1.Grid.GridStructure.ClearSelections();
        gantt1.Grid.GridStructure.FocusedCell=e.TimeItem.GanttRow.GridNode.GetCell(0);
      }
    }

Leave a Reply