DataTable dt = new DataTable();
dt.Columns.Add("AREA", System.Type.GetType("System.String"));
dt.Columns.Add("LOC_F", System.Type.GetType("System.String"));
dt.Columns.Add("LOC_T", System.Type.GetType("System.String"));
dt.Columns.Add("CHECK", System.Type.GetType("System.Boolean"));
DataRow dtRow = dt.NewRow();
dtRow["AREA"] = "1";
dtRow["LOC_F"] = "AAAA";
dtRow["LOC_T"] = "BBBB";
dt.Rows.Add(dtRow);
DataRow dtRow2 = dt.NewRow();
dtRow2["AREA"] = "2";
dtRow2["LOC_F"] = "CCCC";
dtRow2["LOC_T"] = "DDDD";
dt.Rows.Add(dtRow2);
dgdAuditJogai.ItemsSource = dt.DefaultView;
dgdAuditJogai.CanUserAddRows = false;
DataGridRow dr = new DataGridRow();
dr = dgdAuditJogai.Rows[0];
dgdAuditJogai.BottomRows.Add(dr);
dgdAuditJogai.CanUserEditRows = true;
dgdAuditJogai.CanUserAddRows = true;
dgdAuditJogai[2, 1].Value = "1111";
dgdAuditJogai[1, 1].Value = "1111"; |