public void Bind() { try { string query = @"select ProductMaster.id,ProductMaster.pName,ProductDetails.Modelno,ProductDetails.Price,ProductDetails.Quantity from ProductMaster, ProductDetails"; sda = new SqlDataAdapter(query, conn); dt = new DataTable(); sda.Fill(dt); if (dt.Rows.Count > 0) { dataGridView1.DataSource = dt; } dataGridView1.Columns[0].Visible = false;//here i got an error(index out of bound) } catch (Exception ex) { MessageBox.Show(ex.Message); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)