コード例 #1
0
        /// <summary>
        /// Allow new rows based on Form authority
        /// </summary>
        /// <param name="e"></param>
        protected override void OnBeforeRowInsert(BeforeRowInsertEventArgs e)
        {
            base.OnBeforeRowInsert(e);

            if (this.AllowNew == false)
            {
                e.Cancel = true;
            }
        }
コード例 #2
0
 private void OnLoadGridBeforeRowInsert(object sender, BeforeRowInsertEventArgs e)
 {
     //
     try {
         if (this.grdPallets.Rows.Count >= MAX_PALLETS)
         {
             e.Cancel = true;
         }
     }
     catch (Exception ex) { App.ReportError(ex, false, LogLevel.Warning); }
 }
コード例 #3
0
        private void ultraGrid1_BeforeRowInsert(object sender, BeforeRowInsertEventArgs e)
        {
            UltraGridRow objRow = this.ultraGrid1.ActiveRow;

            if (objRow == null)
            {
                return;
            }
            if (objRow.Cells["ClientName"].Value.ToString() == "")
            {
                objRow.Delete(false);
                e.Cancel = true;
            }
        }