DavidGreenfield
asked on
Datagridview - Linklabel
Hi there
Is it possible to create a column in a datagridview where all the cells are shown as link labels? If so how do I got about this
many thanks!
the DataGridView allows you to do this already i believe. just right click on the datagridview, edit columns, and set the COlumnType to DataGridViewLinkColumn
Set the column type to DataGridViewLinkColumn (for each column).
hi kinger! only 25 more points and you get Master! congrats
ASKER
How can I use the datagridviewlinkcolumn with exisitng data?
My data is being loaded form a data table, and its on one of the columns I want turn into a link label. I can only find information on adding a column in, not actually using the data thats already there in the table.
Can I not do this?
thanks for your help so far!
My data is being loaded form a data table, and its on one of the columns I want turn into a link label. I can only find information on adding a column in, not actually using the data thats already there in the table.
Can I not do this?
thanks for your help so far!
when you are in the designer, right click and edit columns in the datagridview. select the column you want to turn into a link label, and navigate the property sheet of that column until you find ColumnType. change that to DataGridViewLinkColumn.
unless you are automatically generating the columns, in which case you must do it by code using something like this:
Dim column As DataGridViewColumn = dataGridView.Columns("Link s")
column.ColumnType = DataGridViewLinkColumn
unless you are automatically generating the columns, in which case you must do it by code using something like this:
Dim column As DataGridViewColumn = dataGridView.Columns("Link
column.ColumnType = DataGridViewLinkColumn
ASKER
Hi newyuppie
I am automatically generating the columns,
but the code you gave me does not work. It says columntype is not a member of datagridviewcolumn. I have celltype option - but this then errors on datagridviewlinkcolumn saying its not a type and cannot be used as an expression.
thanks foryour help so far!
I am automatically generating the columns,
but the code you gave me does not work. It says columntype is not a member of datagridviewcolumn. I have celltype option - but this then errors on datagridviewlinkcolumn saying its not a type and cannot be used as an expression.
thanks foryour help so far!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Kinga, that works perfectly. Thank you very much indeed!