Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > hyperlink in datagridview
 

hyperlink in datagridview

I'm using a GridView in C#.Net 2005. One of the column of the GridView is Hyperlink Column.
When i click the hyperlink i want some message to be displayed in another datagridview page and that should be retreived from database based on the link message.
i know how to put the hyperlink to the text,but i dont konw how to retreive information based on that link. How can i achieve this? Where should i write my coding?
Shirisha Ganta  Thursday, February 15, 2007 12:22 PM

Hi Shirisha,

I assume you must have used DataGridViewLinkColumn to display your HyperLinks. In that case, in order to repspond to User Clicks on HyperLinks, you must handle the CellContentClick event. This event is distinct from the CellClick and CellMouseClick events, which occur when a user clicks anywhere in a cell.

Shah Sahil  Friday, February 16, 2007 7:09 AM

Hi Shirisha,

I assume you must have used DataGridViewLinkColumn to display your HyperLinks. In that case, in order to repspond to User Clicks on HyperLinks, you must handle the CellContentClick event. This event is distinct from the CellClick and CellMouseClick events, which occur when a user clicks anywhere in a cell.

Shah Sahil  Friday, February 16, 2007 7:09 AM
hi sahil
thank you,i got the problem solved.
Shirisha Ganta  Sunday, February 18, 2007 5:36 AM

You can use google to search for other answers

Custom Search

More Threads

• Several BindingSource objects bound to one DataSet
• Code generated by Drag & Dropping - Windows forms over database video tutorials
• DataGridView with dependent ComboBox columns
• selected datarows
• Exception when using a bound dateTimePicker
• Gridview
• Cell/Row DoubleClick event for DataGrid
• Novice Problems
• Column Sort
• Disable automatic Sorting on the Grid