gridcontrol控件新增方法没反应
为什么我button按钮里面写的
gridView1.AddNewRow();
在gridcontrol里的gridview里面没反应呢?
[解决办法]
例如:
/// <summary> /// 初始化新行的赋值 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void gridView1_InitNewRow(object sender, DevExpress.XtraGrid.Views.Grid.InitNewRowEventArgs e) { DataRowView drv = this.gridView1.GetRow(e.RowHandle) as DataRowView; if (drv != null) { drv["str_TypeID"] = this.m_strTypeID; } }