I have a datagridview with a datagridviewlinkcolumn bound to a text link in my list of objects. The text links are links to files, and the files are buried deep in network storage, making for long links. Is there some way I can change the link display value of the linkcolumn to show only a portion of each full link? ie – just the file name itself?
I’ve read you can use the same header text for the display value of a link column, but I’m wondering if all of the display values could be different.
So to summarize, is it possible to show part of a file link in the linkcolumn, while all of the parts I want to show will be different, and still have the actual link point to the full file path?
Figured it out.
Not sure if there’s a better way to do this, but I added a shortened version of the link to my object, and in my
dataGridView1_CellContentClickevent, I get the object associated with the row(dataGridView1.Rows[e.RowIndex].DataBoundItem), and callSystem.Diagnostics.Process.Start()on the fully qualified file path in the object returned.