1 /// <summary>
2 /// 为生成的新行添加默认值
3 /// </summary>
4 /// <param name="sender"></param>
5 /// <param name="e"></param>
6 private void cMS_CNTRDataGridView_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e)
7 {
8 e.Row.Cells["Region"].Value = "WA";
9 e.Row.Cells["City"].Value = "Redmond";
10 e.Row.Cells["PostalCode"].Value = "98052-6399";
11 e.Row.Cells["Region"].Value = "NA";
12 e.Row.Cells["Country"].Value = "USA";
13 e.Row.Cells["CustomerID"].Value = NewCustomerId();
14 }
2 /// 为生成的新行添加默认值
3 /// </summary>
4 /// <param name="sender"></param>
5 /// <param name="e"></param>
6 private void cMS_CNTRDataGridView_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e)
7 {
8 e.Row.Cells["Region"].Value = "WA";
9 e.Row.Cells["City"].Value = "Redmond";
10 e.Row.Cells["PostalCode"].Value = "98052-6399";
11 e.Row.Cells["Region"].Value = "NA";
12 e.Row.Cells["Country"].Value = "USA";
13 e.Row.Cells["CustomerID"].Value = NewCustomerId();
14 }