Dear all,
How to make part of the text in the cells to be URL or HyperLink?? so that it will trigger the function with the URL Value??
e.g. Trans. No: 1234567890
Before I am using below with the whole cell.
private void dtgSalesTransactionsList_AfterCellActivate(object sender, EventArgs e)
Assuming the data type of the column to be typeof(object): set the column's Style property to 'URL', then assign a value like this to the cell:
cell.Value = new Infragistics.Win.FormattedLinkLabel.ParsedFormattedTextValue( "<a href = \"http://www.whatever.com\">1234567890</a>");
You could also use a String column and set the Style to FormattedText. Then you set the Value of the cell to any string which uses our custom XML Format, just like the UltraFormattedLinkLabel control.
So you could put text and a link in the cell together by using a cell value like this:
"Trans. No: <a href = \"http://www.whatever.com\">1234567890</a>"
If you want to trap clicks on this link instead of just letting the O/S launch the URL, then you would have to use a FormattedLinkLabel control as the EditorComponent of the cell/column. In this case, you do not need to set the Style, and you can trap the LinkClicked event of the FormattedLinkLabel.