//protected void GV_CreateOpportunity_ItemCommand(object sender, GridCommandEventArgs e) //{ // Pnl_RevenueDetailsForProducts.Visible = true; // //AddRevenueLinesDetails(); // //BindGrdRevenueDetails(); // Pnl_GrdCreateOpportunity.Visible = true; // DataTable dt_GetOppDetails = obj_BL.getProductName(1); // RadgridForProducts.DataSource = dt_GetOppDetails; // RadgridForProducts.DataBind(); // for (int i = 0; i < dt_GetOppDetails.Rows.Count; i++) // { // DropDownList ddl1 = (DropDownList)RadgridForProducts.Rows[i].Cells[1].FindControl("cmbUOM"); // DropDownList ddl3 = (DropDownList)RadgridForProducts.Rows[i].Cells[2].FindControl("cmbInterface"); // FillDropDownList1(ddl1); // FillDropDownList3(ddl3); // } //} protected void RadgridForProducts_ItemCommand(object sender, GridCommandEventArgs e) { Pnl_RevenueDetailsForProducts.Visible = true; //AddRevenueLinesDetails(); //BindGrdRevenueDetails(); Pnl_GrdCreateOpportunity.Visible = true; //if (e.CommandName == "Select") //{ // int index = e.Item.ItemIndex; // GridDataItem item = (GridDataItem)GV_GrdProposal.Items[index]; // //Get the values from the row uaing the columnUniqueName // ViewState["OppDetailID"] = item["OppDetID"].Text; //} DataTable dt_GetOppDetails = obj_BL.getProductName(1); RadgridForProducts.DataSource = dt_GetOppDetails; RadgridForProducts.DataBind(); for (int i = 0; i < dt_GetOppDetails.Rows.Count; i++) { DropDownList ddl1 = (DropDownList)RadgridForProducts.Rows[i].Cells[1].FindControl("cmbUOM"); DropDownList ddl3 = (DropDownList)RadgridForProducts.Rows[i].Cells[2].FindControl("cmbInterface"); FillDropDownList1(ddl1); FillDropDownList3(ddl3); } }
//protected void GV_GrdRequirements_SelectedIndexChanged(object sender, GridCommandEventArgs e) //{ //foreach (GridDataItem item in GV_GrdRequirements.SelectedItems) //{ // if (RadGrid.SelectCommandName == "AddProduct") // { // //Session["TicketNo"] = item("Ticket No").Text; // } //} //} protected void GV_GrdRequirements_ItemCommand(object sender, GridCommandEventArgs e) { Pnl_GrdRequirements.Visible = true; BindGrdDetails(); Pnl_RevenueDetailsForProducts.Visible = true; //AddRevenueLinesDetails(); //BindGrdRevenueDetails(); DataTable dt_GetOppDetails = obj_BL.getProductName(1); RadgridForProducts.DataSource = dt_GetOppDetails; RadgridForProducts.DataBind(); for (int i = 0; i < dt_GetOppDetails.Rows.Count; i++) { DropDownList ddl1 = (DropDownList)RadgridForProducts.Rows[i].Cells[1].FindControl("cmbQuantityUOM"); TextBox ddl2 = (TextBox)RadgridForProducts.Rows[i].Cells[1].FindControl("txtMRC3p"); DropDownList ddl3 = (DropDownList)RadgridForProducts.Rows[i].Cells[2].FindControl("cmbInterface"); TextBox ddl4 = (TextBox)RadgridForProducts.Rows[i].Cells[1].FindControl("txtActualMRC"); FillDropDownList1(ddl1); FillDropDownList2(ddl2); FillDropDownList3(ddl3); FillDropDownList4(ddl4); } }
private void BindGrdDetails() { DataTable dt_GetOppDetails = obj_clsGeneralFunction.GetOpportunityDetails(Convert.ToInt32(ViewState["OpportunityID"])); //GV_CreateOpportunity.DataSource = dt_GetOppDetails; //GV_CreateOpportunity.DataBind(); RadgridForProducts.DataSource = dt_GetOppDetails; RadgridForProducts.DataBind(); //DataTable dt_GetOppDetails = obj_clsGeneralFunction.GetOpp(Convert.ToString(ViewState["OpportunityID"])); //RadgridForProducts.DataSource = dt_GetOppDetails; //RadgridForProducts.DataBind(); for (int i = 0; i < dt_GetOppDetails.Rows.Count; i++) { DropDownList ddl1 = (DropDownList)RadgridForProducts.Rows[i].Cells[1].FindControl("cmbUOM"); DropDownList ddl3 = (DropDownList)RadgridForProducts.Rows[i].Cells[2].FindControl("cmbInterface"); FillDropDownList1(ddl1); FillDropDownList3(ddl3); } }