Dropdown menu in custom column cell for each task?

Posted by: jwhitney on 30 May 2018, 11:57 am EST

    • Post Options:
    • Link

    Posted 30 May 2018, 11:57 am EST

    Is it possible to have a dropdown menu inside a custom column field? In other words, for each Task / row, the user will see a dropdown menu in the cell where they can select the value for that cell?

  • Posted 30 May 2018, 1:30 pm EST

    Well, I totally forgot to include the control, etc. This question pertains to the WinForms GanttView control.

  • Posted 31 May 2018, 1:12 am EST

    Hello Jeff!

    Here, the trick is to show ComboList items of C1FlexGrid (which has been used as child control in GanttView controls) :

    private void Form1_Load(object sender, EventArgs e)
    {
           C1FlexGrid gridView = c1GanttView1.Controls[2] as C1FlexGrid;
           gridView.BeforeEdit += GridView_BeforeEdit;
    }
    
    private void GridView_BeforeEdit(object sender, RowColEventArgs e)
    {            
           C1FlexGrid gridView = sender as C1FlexGrid;
           gridView.BeginUpdate();
           if(gridView.Cols[e.Col].Name == "CustomColumn1")
                    gridView.Cols[e.Col].ComboList = "A1|A2|A3|A4|A5";
           gridView.EndUpdate();
    }
    

    In addition, below are few help links on C1FlexGrid :

    1. http://help.grapecity.com/componentone/NetHelp/c1flexgrid/webframe.html#C1.Win.C1FlexGrid.4~C1.Win.C1FlexGrid.C1FlexGridBase~BeforeEdit_EV.html
    2. http://help.grapecity.com/componentone/NetHelp/c1flexgrid/webframe.html#C1.Win.C1FlexGrid.4~C1.Win.C1FlexGrid.RowCol~ComboList.html

    Best regards,

    Meenakshi

  • Posted 31 May 2018, 10:19 am EST

    Thanks, I’ll give that a try.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels