protected void gvSales_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { // string datakey = gvSales.DataKeys[e.Row.RowIndex].Values[0].ToString(); GridView gvDetails = e.Row.FindControl("gvDetails") as GridView; gvDetails.DataSource = SalesDetails.GetSalesDetailsByInvno(datakey); gvDetails.DataBind(); } }
private void GetSalesDetailsByInvoice() { string invno = Request["invno"]; var collection = SalesDetails.GetSalesDetailsByInvno(invno); // JsonBridge <SalesDetails> datafeed = new JsonBridge <SalesDetails>(); if (collection.Count != 0) { datafeed.collection = collection; datafeed.Valid = 1; } else { datafeed.collection = collection; datafeed.Valid = 0; } // string output = JsonConvert.SerializeObject(datafeed); Response.Write(output); }