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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

IsTextSelectionEnabled in DataGrid HyperLink Column

Thread ID:

Created:

Updated:

Platform:

Replies:

149320 Nov 21,2019 03:27 PM UTC Dec 13,2019 11:30 AM UTC WPF 3
loading
Tags: SfDataGrid
Brice Yoan Chaton
Asked On November 21, 2019 03:27 PM UTC

Hello,

I would like to know if theres a possibility to get a property like IsTextSelectionEnabled for Grid:GridHyperlinkColumn .
I would like to select the text of an Hyperlink column, and i guess theres is no such property. Is there a workaround like copying the tooltip?
I know that you can select the cell and then press control c, but this is not a great idea for people that dont use computers so much

Thanking you in advance,

Regards,
Brice

Mohanram Anbukkarasu [Syncfusion]
Replied On November 22, 2019 01:47 PM UTC

Hi Brice, 

Thanks for contacting Syncfusion support.  

SfDataGrid doesn’t have any property to enable selection for the hyperlink as per your requirement. From the provided details, we suspect that your requirement is to copy the hyperlink content to the clipboard. It is possible to get the value of the current cell in SfDataGrid and set it as the clipboard content. In the following code example we have copied the hyperlink content to the clipboard when the cell is tapped.  

Code example : 

this.dataGrid.CellTapped += DataGrid_CellTapped; 
 
private void DataGrid_CellTapped(object sender, Syncfusion.UI.Xaml.Grid.GridCellTappedEventArgs e) 
{ 
    if (e.Column.MappingName == "Country") 
    { 
        string text = e.Record.GetType().GetProperty(e.Column.MappingName).GetValue(e.Record).ToString(); 
        if (text.Length > 0) 
            Clipboard.SetText(text); 
    } 
} 

We have prepared a sample using the above code example and it is available in the following link for your reference. 


Please let us know if your require further assistance from us.  

Regards, 
Mohanram A. 


Brice Yoan Chaton
Replied On December 12, 2019 07:49 AM UTC

Hello,

I wanted to try your example, but i don't have the event CellTapped, only CurrentCellActivated, which is not triggered when the cell is selected
"SfDataGrid does not contain a definition for 'CellTapped' and no extension method...

Thank you for your help

Mohanram Anbukkarasu [Syncfusion]
Replied On December 13, 2019 11:30 AM UTC

Hi Brice,   
  
Thanks for the update.    
  
You have selected the platform as WPF, and SfDataGrid WPF contains the CellTapped event. Please refer the below screenshot and reference link.    
  
  
    
  
Please confirm us on the platform and the Syncfusion product version you are using.    
  
Regards,   
Mohanram A  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon