We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

LinkLabel in Cell in Winforms grid

I''m trying to use an standard Windows LinkLabel in a cell. But I need to click in the cell before the pointer turns into an hand and I can activate the link in the cell (which does not go to an web page). Please see example code: LinkLabel lnkLabel = new LinkLabel(); lnkLabel.Text = "SomeText"; lnkLabel.BackColor = Color.White; lnkLabel.LinkClicked += new LinkLabelLinkClickedEventHandler(lnkLabel_LinkClicked); lnkLabel.Links[0].LinkData = someData; theGrid[x,y].Control = lnkLabel; Any tips on how to solve this? I need to handle the click event in my code since it does not fire of a web page. Regards, Geir

3 Replies

AD Administrator Syncfusion Team June 28, 2005 03:53 AM

To get the proper mouse interaction with the link cell, I think you will have to use the technique shown in this sample. \Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\CellTypes\LinkLabelCells You can copy the LinkLabelCell file to your project and just use teh custom cell type to have support for a link cell. Then if you do not want to lauch teh browser, you can comment out this line: //LaunchBrowser(style); in teh OnMouseUp override in the LinkLabelCellRenderer class. Then you can handle the grid.CellClick event to catch the click and act on it.


NP Narasimha Prasad April 4, 2018 03:28 AM

doing poc


AR Arulpriya Ramalingam Syncfusion Team April 4, 2018 10:57 AM

Hi Narasimha, 
 
Thanks for the update, please provide the details of your requirement, if you need any technical assistance on this. 
 
Regards, 
Arulpriya 


Loader.
Live Chat Icon For mobile
Up arrow icon