Hello
I was wondering if you could help me.. I can only display one or all columns from a table in my datagrid. My code is below..
conStr = ConfigurationSettings.AppSettings("mysql.ado.net")
myConnection = New MySqlConnection(conStr)
myConnection.Open()
dataAdapter = New MySqlDataAdapter("select mark from test", myConnection)
myCommandBuilder = New MySqlCommandBuilder(dataAdapter)
dataAdapter.Fill(ds, "test")
myConnection.Close()
dg.DataSource = New DataView(ds.Tables("test"))
The code above is for one column 'mark' to be displayed and i can also display all the columns using..
Code: dataAdapter = New MySqlDataAdapter("select * from test", myConnection)
But i was wondering how I could display two columns from the same table(test) in the same datagrid?????
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).