void Show_customer_bills_Details() { connection(); SqlCommand cmd = new SqlCommand("Bill_Search_Details", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@invno", editdetails); SqlDataAdapter adp = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); adp.Fill(dt); DataRow dr = dt.NewRow(); //con.Close(); int count = dt.Rows.Count; for (int i=0;i<count;i++) { ="" dt.importrow(dr); ="" grdsearch.rows[i].cells["item_description"].value="dt.Rows[i]["Item_Description"].ToString(); " grdsearch.rows[i].cells["hsn_code"].value="dt.Rows[i]["HSN_Code"].ToString(); " grdsearch.rows[i].cells["quantity"].value="dt.Rows[i]["Quantity"].ToString(); " grdsearch.rows[i].cells["converstion_type"].value="dt.Rows[i]["Converstion_Type"].ToString(); " grdsearch.rows[i].cells["rate"].value="dt.Rows[i]["Rate"].ToString(); " grdsearch.rows[i].cells["amount"].value="dt.Rows[i]["Amount"].ToString(); " grdsearch.rows[i].cells["unit_type"].value="dt.Rows[i]["Unit_Type"].ToString(); " }<="" b="">
'Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index'
dt.Rows.Add(dr);
'This row already belongs to this table.'
dt.ImportRow(dr);
adp.Fill(dt);
Fill
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)