protected void gdvlistProductDetail_Sorting(object sender, GridViewSortEventArgs e) { DataView sortedView; string sortingDirection = string.Empty; if (direction == SortDirection.Ascending) { direction = SortDirection.Descending; sortingDirection = "Desc"; } else { direction = SortDirection.Ascending; sortingDirection = "Asc"; } ProductDetail obj = new ProductDetail(); obj.ProductMasterID = Convert.ToInt32(Request.QueryString["ProMasid"]); ds = ProductDetailBLL.GetProductDetailByID(obj); sortedView = new DataView(ds.Tables[0]); sortedView.Sort = e.SortExpression + " " + sortingDirection; Session["SortedView"] = sortedView; gdvlistProductDetail.DataSource = sortedView; gdvlistProductDetail.DataBind(); }
public void BindgdvlistProductDetail() { if (Request.QueryString["ProMasid"] != null) { ProductDetail obj = new ProductDetail(); obj.ProductMasterID = Convert.ToInt32(Request.QueryString["ProMasid"]); ds = ProductDetailBLL.GetProductDetailByID(obj); gdvlistProductDetail.DataSource = ds; gdvlistProductDetail.DataBind(); } }
public void BindGrid() { DataSet ds = new DataSet(); ProductDetail objdrp = new ProductDetail(); currentId = int.Parse(Session["prod_ID"].ToString()); objdrp.ProductMasterID = currentId; ds = ProductDetailBLL.GetProductDetailByID(objdrp); gdvDetails.DataSource = ds; gdvDetails.DataBind(); }
protected void drpOrderDetail_SelectedIndexChanged(object sender, EventArgs e) { DropDownList dpList = (DropDownList)sender; ProductDetail pd = new ProductDetail(); pd.ProductMasterID = int.Parse(dpList.SelectedValue); DataSet ds_temp = ProductDetailBLL.GetProductDetailByID(pd); // ds_temp.Tables[0].Columns //Label lbl = gdvOrderDetail.Rows[gdvOrderDetail.SelectedIndex].FindControl("lblCP") as Label; //lbl.Text = "1.0"; //Label lbl_SP = gdvOrderDetail.Rows[gdvOrderDetail.SelectedIndex].FindControl("lblSP") as Label; //lbl_SP.Text = "1.2"; Label lbl = gdvOrderDetail.Rows[gdvOrderDetail.EditIndex].FindControl("lblSP") as Label; lbl.Text = "3.2"; Label lbl1 = gdvOrderDetail.Rows[gdvOrderDetail.EditIndex].FindControl("lblCP") as Label; lbl1.Text = "2.2"; }