protected void SKUDDLByEdit_SelectedIndexChanged(object sender, EventArgs e) { DropDownList dplSKUByEdit = (DropDownList)sender; if (string.IsNullOrEmpty(dplSKUByEdit.SelectedValue)) { return; } MasterData.SKURow sku = new MasterDataBLL().GetSKUById(int.Parse(dplSKUByEdit.SelectedValue.ToString()))[0]; decimal priceRow = sku.IsStandardCostNull() ? 0 : decimal.Round((decimal)(sku.StandardCost * ((decimal)1.17) * ((decimal)1.1)), 2); TextBox txtDeliveryPriceByEdit = (TextBox)this.gvDetails.Rows[gvDetails.EditIndex].FindControl("txtDeliveryPrice"); txtDeliveryPriceByEdit.Text = priceRow.ToString("N"); }