protected void gvTempleton_ItemCommand(object source, GridCommandEventArgs e) { string TransactionType = string.Empty; string TransactionClassificationCode = string.Empty; DisplayType = ddlExternalSource.SelectedValue; if (e.CommandName == RadGrid.UpdateCommandName) { //strExternalCodeToBeEdited = Session["extCodeTobeEdited"].ToString(); CustomerBo customerBo = new CustomerBo(); bool isUpdated = false; GridEditableItem gridEditableItem = (GridEditableItem)e.Item; DropDownList txtCode = (DropDownList)e.Item.FindControl("ddlclassificationCode"); TextBox txtType = (TextBox)e.Item.FindControl("txttransactiontype"); string prevTransactionType = gvTempleton.MasterTableView.DataKeyValues[e.Item.ItemIndex]["Transaction_Type"].ToString(); TransactionType = txtType.Text; TransactionClassificationCode = txtCode.SelectedValue.ToString(); isUpdated = customerBo.EditTempletonDataTranslateMappingDetalis(prevTransactionType, TransactionType, TransactionClassificationCode); } //if (e.CommandName == RadGrid.DeleteCommandName) //{ // bool isDeleted = false; // customerBo = new CustomerBo(); // GridDataItem dataItem = (GridDataItem)e.Item; // TableCell strSchemePlanCodeForDelete = dataItem["PASP_SchemePlanCode"]; // TableCell strSchemePlanNameForDelete = dataItem["PASP_SchemePlanName"]; // TableCell StrExternalCodeForDelete = dataItem["PASC_AMC_ExternalCode"]; // TableCell strExternalTypeForDelete = dataItem["PASC_AMC_ExternalType"]; // strSchemePlanCode = int.Parse(strSchemePlanCodeForDelete.Text); // strExternalCode = StrExternalCodeForDelete.Text; // strExternalType = strExternalTypeForDelete.Text; // deletedDate = DateTime.Now; // isDeleted = customerBo.DeleteMappedSchemeDetails(strSchemePlanCode, strExternalCode, strExternalType, createdDate, editedDate, deletedDate); //} if (e.CommandName == RadGrid.PerformInsertCommandName) { CustomerBo customerBo = new CustomerBo(); bool isInserted = false; GridEditableItem gridEditableItem = (GridEditableItem)e.Item; DropDownList txtCode = (DropDownList)e.Item.FindControl("ddlclassificationCode"); TextBox txtType = (TextBox)e.Item.FindControl("txttransactiontype"); TransactionType = txtType.Text; TransactionClassificationCode = txtCode.SelectedValue.ToString(); isInserted = customerBo.InsertTempletonDataTranslateMappingDetalis(TransactionType, TransactionClassificationCode); } if (DisplayType == "KARVY") { BindDataTranslatorDetails(); gvCamsKarvy.DataSource = dsDataTransDetails; gvCamsKarvy.DataBind(); } if (DisplayType == "CAMS" || DisplayType == "Sundaram") { BindDataTranslatorDetails(); gvCams.DataSource = dsDataTransDetails; gvCams.DataBind(); } if (DisplayType == "Templeton") { BindDataTranslatorDetails(); gvTempleton.DataSource = dsDataTransDetails; gvTempleton.DataBind(); } //BindDataTranslatorDetails(); }