Browser window is opening by default when user click 'CustomCellTypes.LinkLabelCell' type cell in Grid



Above code in written in Grid QueryCellInfo event. I don't want to open browser on hyperlink click as i am handling this click in CellClick event.

Please provide resolution for this issue.


Thanks,

1 Reply

SN Sindhu Nagarajan Syncfusion Team May 28, 2018 08:54 AM UTC

Hi Pulkit,   
   
Thanks for contacting Syncfusion support.   
   
As per the GridControl current support, the browser will be launched whenever the mouse down for the LinkLabel cell is occurred. In order to restrict launching the browser, the CellMouseDown event can be handled based on conditions. Please refer to the below code and sample,   
   
Code example     
//Event triggering   
gridControl1.CellMouseDown += GridControl1_CellMouseDown;   
   
//Event customization   
private void GridControl1_CellMouseDown(object sender, GridCellMouseEventArgs e)   
{   
    GridStyleInfo style = gridControl1.GetViewStyleInfo(e.RowIndex, e.ColIndex);   
    if(style.CellType == CustomCellTypes.LinkLabelCell.ToString())   
    {   
        //To handle launching the browser.   
        e.Cancel = true;   
    }   
}   
   
   
Regards,   
Sindhu  


Loader.
Up arrow icon