Exemplo n.º 1
0
        protected bool IsDataModify(Object grid)
        {
            DataTable dt = null;

            if (grid is GridControl)
            {
                GridControl gridControl = ((GridControl)grid);
                gridControl.MainView.CloseEditor();
                gridControl.MainView.UpdateCurrentRow();
                dt = (DataTable)gridControl.DataSource;
            }
            else if (grid is VGridControl)
            {
                VGridControl gridControl = ((VGridControl)grid);
                gridControl.CloseEditor();
                gridControl.UpdateFocusedRecord();
                dt = (DataTable)gridControl.DataSource;
            }

            if (dt == null || dt.GetChanges() == null || dt.GetChanges().Rows.Count == 0)
            {
                MessageDisplay.Error(MessageDisplay.MSG_NO_DATA_FOR_MODIFY);
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
 public static void AcceptText(Control control)
 {
     if (control is GridControl)
     {
         GridControl gridControl = (GridControl)control;
         gridControl.MainView.CloseEditor();
         gridControl.MainView.UpdateCurrentRow();
     }
     else if (control is VGridControl)
     {
         VGridControl vGridControl = (VGridControl)control;
         vGridControl.CloseEditor();
         vGridControl.UpdateFocusedRecord();
     }
 }