将数组绑定到DataGridViewComboBoxCell c#

时间:2018-08-05 12:52:31

标签: c# datagridviewcomboboxcell

 private void btnAddItem_Click(object sender, EventArgs e)
    {
        DataTable Dt = DB.SelectItemDetails(Convert.ToString(txtItemList.Text));

        DataGridViewRow row = new DataGridViewRow();
        row.Cells.Add(new DataGridViewTextBoxCell { Value = Dt.Rows[0]["ItemName"] });
        row.Cells.Add(new DataGridViewTextBoxCell { Value = Dt.Rows[0]["ItemPrice"] });
        int num = Convert.ToInt16(Dt.Rows[0]["Qty"]);
        int[] numArry = new int[num];
        for (int i =1 ; i == num; i++)
        {
            numArry[i] = i;
        }

        row.Cells.Add(new DataGridViewComboBoxCell { Value =  }
        dgvBill.Rows.Add(row);



    }

需要将numArry添加到DataGridViewComboBoxCell尝试了很多方法,但仍然无法弄清

0 个答案:

没有答案