hi,
How to retrieve data from database to Gridview when i Doubleclick a particular cell using C#.i past my code bellow,plz help me
private void Form3_Load(object sender, EventArgs e)
{
cn = new SqlConnection("data source=server2;database=costing1;user id=sa;password=sa");
da = new SqlDataAdapter("select *from CATABLE001 where 1=2", cn);
ds = new DataSet();
da.MissingSchemaAction = MissingSchemaAction.AddWithKey;
da.Fill(ds, "CATABLE001");
dataGridView1.DataSource = ds.Tables[0];
private void dataGridView1_DoubleClick(object sender, EventArgs e)
{
int sno = int.Parse(Interaction.InputBox("Enter ItemCode", "db operations", "", 50, 50));
DataRow dr = ds.Tables["CATABLE001"].Rows.Find(sno);
dataGridView1.DataSource = ds.Tables["CATABLE001"];
}
Loading

Roei BarRank #1,271 · 1.4K reputationPosted Sep 10, 2009, 12:42 AM EDT
roy himanshu98 reputationPosted Sep 10, 2009, 12:57 AM EDT
i want retrive the data in same grid.
thanx
roy himanshu98 reputationPosted Sep 11, 2009, 1:37 AM EDT
plz can any one help me.plz give me the code .plz iam suffering with this problem from several hours.plz send the code.
Naeem KhanRank #2,072 · 698 reputationPosted Sep 11, 2009, 3:45 AM EDT
roy himanshu98 reputationPosted Sep 11, 2009, 4:19 AM EDT
can u send this code clearly.i didn't quite understand it.plz
roy himanshu98 reputationPosted Sep 11, 2009, 4:29 AM EDT
in this task iam not using text boxes.when i double clicked in the particular cell,then open a window.in that window i given item code then click ok buttonthen the record is displayed in the same gridview only.(its like search option).plz give me code.
otherwise
plz tell me how can i find a particular record when i double clicked in gridview cell.the record is displayed in the same gridview only.plz post the code.i searching for this code from several hours.plz.
thanx in advance.