2
Answers

DataGridView - Column

Onur Sorhan

Onur Sorhan

12y
1.6k
1
How can I transfer elsewhere the writing on the DataGridView's Column?
Answers (2)
0
Senthilkumar
NA 15.2k 2.4m 12y
0
Dyson Dyson
NA 15 7.6k 12y
Hai Senthilkumar : i got that but i need an example ill use select command and how can i make it display in text box 
0
Senthilkumar
NA 15.2k 2.4m 12y
connectionString="Data source=localhost; initial catalog= example1; user id=sa password=sa"
0
Dyson Dyson
NA 15 7.6k 12y
Krishna Garad :you had mentioned "Ur connection string here" how can i get that idont know Im a beginner only 
0
Dyson Dyson
NA 15 7.6k 12y
Hai  Krishna Garad i need full coding.
0
Krishna Garad
NA 16.5k 6.2m 12y
you can try like this

SqlConnection cn=new SqlConnection("U r Connection String Here...");
cn.Open();
SqlCommand cmd=new SqlCommand("Select * From TableName",cn);
DataSet ds=new DataSet();
SqlDataAdapter da=new SqlDataAdapter(cmd);
da.Fill(ds);
cn.Close();
//display data in textboxes from the dataset

TextBox1.Text=ds.Tables[0].Rows[0]["ColumnName"].ToString();
.....