Display data using HyperLink
C#
2
Posts
2
Posters
0
Views
1
Watching
-
From database i m fetching data i want to display Data in hyperlink (Windows form application) the code is below
string conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + "\\db1.mdb";
OleDbConnection con = new OleDbConnection(conn); OleDbCommand cmd = con.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "Select \* from Player where CountryID=" + index; OleDbDataAdapter da = new OleDbDataAdapter(cmd); DataSet ds = new DataSet("Player"); OleDbCommandBuilder oldbcbr = new OleDbCommandBuilder(da); da.Fill(ds, "Player"); dataGridView2.DataSource = ds; DataTable dt = new DataTable(); da.Fill(dt); dataGridView2.DataSource = dt; try { for (int i = 0; i <= ds.Tables\[0\].Rows.Count - 1; i++) { MessageBox.Show(ds.Tables\[0\].Rows\[i\].ItemArray\[0\] + " -- " + ds.Tables\[0\].Rows\[i\].ItemArray\[1\]); } } catch (Exception ex) { MessageBox.Show("Can not open connection ! "); }
Pls tell me how to display data as hyperlink in gridview or using Some other Control
-
From database i m fetching data i want to display Data in hyperlink (Windows form application) the code is below
string conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + "\\db1.mdb";
OleDbConnection con = new OleDbConnection(conn); OleDbCommand cmd = con.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "Select \* from Player where CountryID=" + index; OleDbDataAdapter da = new OleDbDataAdapter(cmd); DataSet ds = new DataSet("Player"); OleDbCommandBuilder oldbcbr = new OleDbCommandBuilder(da); da.Fill(ds, "Player"); dataGridView2.DataSource = ds; DataTable dt = new DataTable(); da.Fill(dt); dataGridView2.DataSource = dt; try { for (int i = 0; i <= ds.Tables\[0\].Rows.Count - 1; i++) { MessageBox.Show(ds.Tables\[0\].Rows\[i\].ItemArray\[0\] + " -- " + ds.Tables\[0\].Rows\[i\].ItemArray\[1\]); } } catch (Exception ex) { MessageBox.Show("Can not open connection ! "); }
Pls tell me how to display data as hyperlink in gridview or using Some other Control