private void grdAttributes_CellDoubleClick(object sender, GridViewCellEventArgs e) { if (grdCompanyGroup.CurrentRow == null) { return; } ObjMaster.GetByPrimaryKey(grdCompanyGroup.CurrentRow.Cells[Col_Group.ID].Value); DisplayRecord(); }
private void grdAttributes_RowsChanging(object sender, GridViewCollectionChangingEventArgs e) { if (e.Action == Telerik.WinControls.Data.NotifyCollectionChangedAction.Remove) { if (this.CanDelete == false) { // ENUtils.ShowMessage("Permission Denied"); e.Cancel = true; } else { if (grdCompanyGroup.CurrentRow == null) { return; } GroupBO objMaster = new GroupBO(); try { objMaster.GetByPrimaryKey(grdCompanyGroup.CurrentRow.Cells["Id"].Value.ToInt()); if (objMaster.Current != null) { // string Name = objMaster.Current.Name.ToStr(); // string ShortName = objMaster.Current.ShortName.ToStr(); // bool IsDefaultCheck = Convert.ToBoolean(ObjMaster.Current.IsDefault); objMaster.Delete(objMaster.Current); OnNew(); } } catch (Exception ex) { if (objMaster.Errors.Count > 0) { ENUtils.ShowMessage(objMaster.ShowErrors()); } else { ENUtils.ShowMessage(ex.Message); } e.Cancel = true; } } } }