0
Answer

how to Copy data of Datagridview?

Mohsin

Mohsin

15y
2.2k
1
I got data from database into my datagridview via sqlDatasource1 i.e by using given tools, no programming et all.
I want to access rows of each Gridview row separately and then show them in textboxes of my own choice, instead of in gridview. How can I do that?
It works
numberOfRows = datagridview.Rows.Count;

but following doesn't

textbox1.Text=datagridview.Rows[0].cells[1].Text;
Dont know why it doesn;t?

Then I tried to get data of this gridview to another but it didn;t work too.

Help me plzzz.....I m struck here
Regards,
Mohsin
[email protected]
I tried this, but it didn;t work
 
DataSet dataset = dgv.DataSource as DataSet;
            DataView dv = new DataView(dataset.Tables[0]);
            dgv2.DataSource = dv;
            dgv2.DataBind();