/// <summary> /// 重置弹出框 /// </summary> public void ResetPopup() { this.isFilter = false; gridView.ClearSelection(); gridView.MakeRowVisible(0); if (IsAutoSelectFirst) { this.SelectedIndex = 0; } this.isFilter = true; }
public void AddRow(DevExpress.XtraGrid.Views.Grid.GridView View) { int currentRow; currentRow = View.FocusedRowHandle; if (currentRow < 0) { currentRow = View.GetDataRowHandleByGroupRowHandle(currentRow); } if (View.GroupedColumns.Count == 0) { return; } string grp = View.GetRowCellValue(currentRow, colGRP).ToString(); GenelDataSet.XGTRow xgtRow = this.genelDataSet.XGT.FindByGRPID(grp, "+"); if (xgtRow.SYS == "M" || xgtRow.SYS == "V") // Grup Modify ise eklenebilir { View.AddNewRow(); View.SetRowCellValue(View.FocusedRowHandle, colGRP, grp); View.SetRowCellValue(View.FocusedRowHandle, colID, ""); View.SetRowCellValue(View.FocusedRowHandle, colSYS, "V"); // User Modify View.UpdateCurrentRow(); View.MakeRowVisible(View.FocusedRowHandle, true); View.ShowEditor(); } }
private void btnFind_Click(object sender, System.EventArgs e) { int rowHandle = GetRowHandleByColumnValue(gridView1, "CustomerID", "DRACD"); if (rowHandle != GridControl.InvalidRowHandle) { gridView1.FocusedColumn = gridView1.Columns.ColumnByFieldName("CustomerID"); gridView1.FocusedRowHandle = rowHandle; if (gridView1.IsRowVisible(rowHandle) == RowVisibleState.Hidden) { gridView1.MakeRowVisible(rowHandle, false); } gridView1.ShowEditor(); } else { MessageBox.Show("Not found!"); } }