datagrid view cell with multiple links

didgydont

Active member
Joined
Mar 2, 2009
Messages
37
Programming Experience
Beginner
hello all
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
 
i have had a look around and found some custom colums that have percentage bars but have still found it way to hard to understand. would you know any places for guides to help me achive my goal ?
 
Back
Top