Exemplo n.º 1
0
        public void DisplayAvailableStates(List <string> workItemNames, NextStatesFor nextStatesFor)
        {
            workItemGrid.Rows.Clear();
            foreach (var workItemName in workItemNames)
            {
                var row = new DataGridViewRow();
                row.CreateCells(workItemGrid);
                row.Cells[0]       = new DataGridViewTextBoxCell();
                row.Cells[0].Value = workItemName;

                row.Cells[1] = new DataGridViewComboBoxCell();
                var cell = (DataGridViewComboBoxCell)row.Cells[1];

                List <string> states;
                string        defaultState;
                nextStatesFor(workItemName, out states, out defaultState);
                cell.DataSource = states;
                cell.Value      = defaultState;

                workItemGrid.Rows.Add(row);
            }
        }
Exemplo n.º 2
0
        public void DisplayAvailableStates(List<string> workItemNames, NextStatesFor nextStatesFor)
        {
            workItemGrid.Rows.Clear();
            foreach (var workItemName in workItemNames)
            {
                var row = new DataGridViewRow();
                row.CreateCells(workItemGrid);
                row.Cells[0] = new DataGridViewTextBoxCell();
                row.Cells[0].Value = workItemName;

                row.Cells[1] = new DataGridViewComboBoxCell();
                var cell = (DataGridViewComboBoxCell) row.Cells[1];

                List<string> states;
                string defaultState;
                nextStatesFor(workItemName, out states, out defaultState);
                cell.DataSource = states;
                cell.Value = defaultState;

                workItemGrid.Rows.Add(row);
            }
        }