public void AttachFile_button_Click(object sender, RoutedEventArgs e) { // Create OpenFileDialog Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog();
// Display OpenFileDialog by calling ShowDialog method Nullable<bool> result = dlg.ShowDialog();
if (result == true) { string[] strPath = dlg.FileName.Split(Convert.ToChar(@"\")); newServiceReport.FileName = strPath[strPath.Length - 1]; }
// Create a hyperlink for the match //var link = new Hyperlink(new Run(newServiceReport.FileName)) //{ // NavigateUri = new Uri(newServiceReport.FileName) //}; //link.Click += cnn_Click;
db.ServiceReportFiles.InsertOnSubmit(newServiceReport); db.SubmitChanges(); ServiceReportDataGrid.ItemsSource = db.ServiceReportFiles.ToList();
}
The closest link I can find is this: http://stackoverflow.com/questions/9058920/how-to-set-navigation-url-for-text-in-datagrid-column
but it still does not help.
thanks.