protected void grdCokeDynamic_SelectedIndexChanging(object sender, GridViewSelectEventArgs e) { try { lblMsg.Text = string.Empty; // Guid guid = ML_Common.String2Guid(grdCokeComposite.DataKeys[e.NewSelectedIndex].Values[0].ToString()); //int lngId = ML_Common.string2int(grdCokeComposite.DataKeys[e.NewSelectedIndex].Values[0].ToString()); int lngId = ML_Common.string2int32(grdCokeDynamic.DataKeys[e.NewSelectedIndex].Values[0].ToString()); ViewState["grdCokeDynamicId"] = lngId; if (lngId > 0) { FormFieldsClear(); //FillObjectToForm(lngId, false); // UpdatePanelView.Update(); //ModalPopupExtenderView.Show(); } else { lblMsg.Text = "Record is not exists?"; } UpdatePanelCokeDynamicDisplay.Update(); } catch (Exception ex) { Exception exc = ex;// LogManager.LogManager.WriteErrorLog(ex); } }
protected void grdCokeDynamic_RowDeleting(object sender, GridViewDeleteEventArgs e) { try { // Guid guid = ML_Common.String2Guid(grdCokeComposite.DataKeys[e.RowIndex].Values[0].ToString()); int lngId = ML_Common.string2int(grdCokeDynamic.DataKeys[e.RowIndex].Values[0].ToString()); DeleteGridRowItem(lngId); ViewState["grdCokeDynamic"] = null; //FillGrid(); // FormFieldsClear(); //PanelEditFormDisplay(false); lblMsg.Text = string.Empty; UpdatePanelCokeDynamicDisplay.Update(); } catch (Exception ex) { Exception exc = ex;// LogManager.LogManager.WriteErrorLog(ex); } }