Пример #1
0
        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, "+");

            View.AddNewRow();
            View.SetRowCellValue(View.FocusedRowHandle, colTUR, View.GetRowCellValue(currentRow, colTUR));

            //View.UpdateCurrentRow();
            View.MakeRowVisible(View.FocusedRowHandle, true);
            View.FocusedColumn = colTOP;
            View.ShowEditor();
        }
        private void UpdateGridSelection(Appointment apt)
        {
            DataRowView rowView   = (DataRowView)apt.GetSourceObject(schedulerDataStorage1);
            int         rowHandle = carsDBDataSet.CarScheduling.Rows.IndexOf(rowView.Row);

            gridView1.SelectRow(rowHandle);
            gridView1.MakeRowVisible(rowHandle, false);
        }