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
roy himanshuPosted Sep 11, 2009, 8:29 AM
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.
roy himanshuPosted Sep 11, 2009, 8:19 AM
can u send this code clearly.i didn't quite understand it.plz
Naeem KhanPosted Sep 11, 2009, 7:45 AM
roy himanshuPosted Sep 11, 2009, 5:37 AM
plz can any one help me.plz give me the code .plz iam suffering with this problem from several hours.plz send the code.
roy himanshuPosted Sep 10, 2009, 4:57 AM
i want retrive the data in same grid.
thanx
Roei BarPosted Sep 10, 2009, 4:42 AM