private void bbiNew_ItemClick(object sender, ItemClickEventArgs e) { BindingList <Model.ConfigPath> dataSource = this.gridControl.DataSource as BindingList <Model.ConfigPath>; dataSource.Add(ConfigPathCollection.NewTemplate( )); this.gridView.BestFitColumns( ); //this.bsiRecordsCount.Caption = "RECORDS : " + ((BindingList<ConfigPath>) this.gridControl.DataSource).Count; }
private void gridView1_InitNewRow(object sender, DevExpress.XtraGrid.Views.Grid.InitNewRowEventArgs e) { GridView gv = sender as GridView; var o = ConfigPathCollection.NewTemplate( ); gv.SetRowCellValue(e.RowHandle, gv.Columns[ConfigPath.ISACTIVE_DISPLAYNAME], o.IsActive); gv.SetRowCellValue(e.RowHandle, gv.Columns[ConfigPath.TYPE_DISPLAYNAME], o.Type); gv.SetRowCellValue(e.RowHandle, gv.Columns[ConfigPath.SHORTCUT_DISPLAYNAME], o.ShortCut); gv.SetRowCellValue(e.RowHandle, gv.Columns[ConfigPath.PATHDIR_DISPLAYNAME], o.PathDir); //gv.SetRowCellValue( e.RowHandle, gv.Columns[ ConfigPath.BASEDIR_DISPLAYNAME ], o.BaseDir ); //this.bsiRecordsCount.Caption = "RECORDS : " + ((BindingList<ConfigPath>) this.gridControl.DataSource).Count; }