how to retrieve values into datagridview in run time with out using binding source
pls respond;
Data grid view
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
selva kumarRank #2,987 · 483 reputationPosted Jun 17, 2013, 11:00 PM EDT
public void bind()
{
Con.Open();
SDA = new SqlDataAdapter("Select * From
DataSet Ds = new DataSet();
SDA.Fill(Ds);
GridView1.DataSource = Ds;
GridView1.DataBind();
Con.Close();
}
Hope this will be helpful...
Ravi ShekharRank #673 · 3.6K reputationPosted Jun 17, 2013, 11:54 PM EDT
{
SqlDataAdapter adap= new SqlDataAdapter("Select * From table", cn);
DataSet ds= new DataSet();
adap.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
above code bind your gridview with data.
shankar Bhamidipati18 reputationPosted Jun 18, 2013, 11:00 PM EDT
that washelp full
shankar Bhamidipati18 reputationPosted Jun 18, 2013, 11:01 PM EDT
Ravi ShekharRank #673 · 3.6K reputationPosted Jun 18, 2013, 11:02 PM EDT