Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
535
Changing URL when LinkClicked (Wingrid)
posted

Hi,

i my WinGrid i have a column which is ColumnStyle.URL

If the cell contains the local path (c:\xyz\abc) then clicking opens the windows explorer with the folder abc.

Now i want to display only the folder in the cell (abc) and not the whole path.

So i added the following code in order to get a LinkClicked event:

Infragistics.Win.UltraWinGrid.UltraGridColumn colDownload = ugrdSender.DisplayLayout.Bands[0].Columns["DownloadFolder"];
colDownload.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.URL;
Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor editorDownload = colDownload.Editor as Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor;
editorDownload.LinkClicked += new Infragistics.Win.FormattedLinkLabel.LinkClickedEventHandler(editorDownload_LinkClicked);

The event ist defined:

private void editorDownload_LinkClicked(object sender, Infragistics.Win.FormattedLinkLabel.LinkClickedEventArgs e)
        {
            
            e.LinkText = "c:\\abc\\" + e.LinkText;
          
        }

But e.LinkText seems to be ReadOnly??

How can i add the basepath (C:\xyz) bevor the Link opens the explorer ..?

thanks for every idea!!!

Torsten