[Solved] - Can i display signature instead cell value?

Hi,
I have a column contains file path in the datagrid, some paths are quite long so it's hard to keep track, instead of displaying all: "C:\Users\abcxyz\abcxyz1\Desktop" I want to display only as: "..\Desktop" 
Can I do this or not?
Many thanks!

3 Replies

SS Susmitha Sundar Syncfusion Team May 11, 2020 03:16 PM UTC

Hi GridLock, 

Thank you for using Syncfusion controls. 

You can change the GridHypelinkColumn text value by using the SfDataGrid.DrawCell event. 

this.sfDataGrid1.DrawCell += SfDataGrid1_DrawCell; 
 
private void SfDataGrid1_DrawCell(object sender, DrawCellEventArgs e) 
{ 
    if(e.Column.MappingName == "Hyperlink") 
    { 
        string displaytext =e.DisplayText.Remove(0,11); 
 
        e.DisplayText = displaytext; 
    } 
} 


Please check the sample and let us know if you need further assistance on this. 

Regards, 
Susmitha S 



TG The GridLock May 11, 2020 08:09 PM UTC

Thanks Susmitha,
This will help me coming!


SS Susmitha Sundar Syncfusion Team May 12, 2020 07:07 AM UTC

Hi GridLock, 
 
Thanks for the update. 
 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Susmitha S 


Loader.
Up arrow icon