Beispiel #1
0
        private void AddRow(Cell cell)
        {
            var val = new DataGridViewRow();

            val.CreateCells(grid, "cell1", "cell2", "cell3");
            val.Cells[0].Value = cell.Row.ToString();
            val.Cells[1].Value = cell.Col.ToString();
            val.Cells[2].Value = cell.Name;

            grid.Rows.Add(val);
        }
Beispiel #2
0
        private void BtnAddColumnClick(object sender, EventArgs e)
        {
            if (typeFieldList.SelectedIndex != -1)
            {
                var cell = new Cell();
                cell.Name = (string)typeFieldList.Items[typeFieldList.SelectedIndex];
                cell.Row = Convert.ToInt32(row.Text);
                cell.Col = Convert.ToInt32(col.Text);

                Supp.ListCell.Add(cell);
                AddRow(cell);

            }
        }