1
目前我一直在使用Devexpress Datagridview。所以,我需要下面的代碼轉換成其的DevExpress的DataGridView相當於:devexpress gridView.Rows和單元格?
int id = e.RowIndex;
DataGridViewRow row = dgvproductMenu.Rows[id];
if (dgvproductMenu.Columns[e.ColumnIndex].Name == "Update")
{
product ObjP = new product
{
Product_id = row.Cells[2].Value.ToString(),
Name = row.Cells[3].Value.ToString(),
Description = row.Cells[4].Value.ToString(),
Price = Convert.ToDouble(row.Cells[5].Value),
Uom = row.Cells[6].Value.ToString(),
Quantity =Convert.ToInt32(row.Cells[7].Value.ToString()),
Tax = row.Cells[8].Value.ToString()
};
frmAddProduct fm = new frmAddProduct(ObjP);
fm.ShowDialog();
this.fillGrid();
我想用的DevExpress擴展(GridView控件)做到這一點。
爲什麼不考慮devexpress文檔? – Rahul
DataRow row = gdvInvoiceSummary.GetDataRow(gdvInvoiceSummary.GetSelectedRows()[0]); 如果(e.Button.Caption == 「更新」) { 帳單摘要OBJ =新帳單摘要 { //客戶名稱=行。 }; frmAddinvoice fm = new frmAddinvoice(); fm.ShowDialog(); } – RifathMohamed
也許從獲取和設置單元值文檔開始:https://documentation.devexpress.com/#windowsforms/CustomDocument753 – Brendon