hello all
i have a datagrid view that is populated by mysql
but in the last column im trying to have 2 links in each cell "Edit View".
i have looked for adding link labes dynamicly with no luck
i have now set the column to DataGridViewLinkColumn but i cant work out how to make it two links.
i would then also need to know how to work out which link was clicked or make the link perform a function that like editthis(reader.GetString(0))
thank you i hope i have explained it well enough
i have a datagrid view that is populated by mysql
VB.NET:
Dim query As String = "SELECT * FROM pages ORDER by pageorder"
Dim connection As New MySqlConnection(connStr)
Dim cmd As New MySqlCommand(query, connection)
connection.Open()
Dim reader As MySqlDataReader
reader = cmd.ExecuteReader()
While reader.Read()
Dim pageorder As Int32 = reader.GetString(2)
Dim hidden As Boolean = reader.GetString(3)
DataGridView1.Rows.Add(reader.GetString(0), reader.GetString(1), reader.GetString(5) & " By " & _
reader.GetString(6), pageorder, reader.GetString(0), hidden, reader.GetString(0) & " test")
End While
reader.Close()
connection.Close()
but in the last column im trying to have 2 links in each cell "Edit View".
i have looked for adding link labes dynamicly with no luck
i have now set the column to DataGridViewLinkColumn but i cant work out how to make it two links.
i would then also need to know how to work out which link was clicked or make the link perform a function that like editthis(reader.GetString(0))
thank you i hope i have explained it well enough