/// <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; } }
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); } }
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; } }