void Grid_RowsChanging(object sender, GridViewCollectionChangingEventArgs e) { if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.Remove) { objMaster = new ComplaintBO(); try { objMaster.GetByPrimaryKey(grdLister.CurrentRow.Cells["Id"].Value.ToInt()); if (objMaster.Current != null) { objMaster.Delete(objMaster.Current); } } catch (Exception ex) { if (objMaster.Errors.Count > 0) { ENUtils.ShowMessage(objMaster.ShowErrors()); } else { ENUtils.ShowMessage(ex.Message); } e.Cancel = true; } } }
public frmComplaint(int Id, bool IsHide) { InitializeComponent(); InitializeConstructor(); grdLister.ShowRowHeaderColumn = false; ComboFunctions.FillCompany_AllCombo(ddlAccount); objMaster.GetByPrimaryKey(Id); DisplayRecord(); radPanel2.Enabled = false; grdLister.Enabled = false; btnOnNew.Enabled = false; IsHidePopulateDate = IsHide; }