Click here to Skip to main content
15,884,986 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to show cv of candidate when user click on link of gridview.i have number of cv in that folder.how it is possible?
i have following code
C#
private void FrmCorporateCandidateReport_Load(object sender, EventArgs e)
        {
            //Create instance for datagrid view link column class
            DataGridViewLinkColumn link = new DataGridViewLinkColumn();
            link.UseColumnTextForLinkValue = true;
            //Enter your link button column header text
            link.HeaderText = "Click to View Details";
            //set the property name for link column
            link.DataPropertyName = "lnkColumn";
            //set default active color for link
            link.ActiveLinkColor = Color.White;
            link.LinkBehavior = LinkBehavior.SystemDefault;
            //set default link color 
            link.LinkColor = Color.Blue;
            //set default link text
            link.Text = "View Details";

            //set visited color means if user click that link what color would be change
            link.VisitedLinkColor = Color.YellowGreen;
            //Add this link column to datagrid view
            dataGridView1.Columns.Add(link);
        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

            if (e.ColumnIndex == 0)
            {

                Process myProc;
                myProc = Process.Start("C:\\Resumeupload\\txtdestinationpath.docx");

                //string[] files = Directory.GetFiles(@"C:\\Resumeupload", "count*.docx");

               

                //myProc.CloseMainWindow();


            }
            else
            {
                //MessageBox.Show("No Record Found");
            }
        }


when user search by first name last name it display gridview and when click on link button i want to show cv of that candidatein MCword....any help i m newbie..
Posted
Updated 10-Aug-12 4:41am
v4
Comments
Abdul Quader Mamun 9-Aug-12 3:00am    
Edited for code block.
16041984 9-Aug-12 4:00am    
plz give me any solution
Sergey Alexandrovich Kryukov 10-Aug-12 12:42pm    
Any?!... :-)
--SA
ZurdoDev 10-Aug-12 12:16pm    
Just hyperlink to the file.
Maciej Los 10-Aug-12 15:51pm    
I haven't see the part of code where you load the data (the full path of CV files)...

1 solution

There is a lot of information missing here but I can give you a general outline of what I did in a simular project:

1. I got the relevant data either form a list of files or an SQL server, and stored these items in a List(of MyClass) that contained all the properties of the nessecary items I wanted to show.

2. I used a ListView together with a GridView (WPF) and binded the List(of MyClass) to it.

3. Not if I clicked on an Item so that the Selected Item changed I updated a priview filed of the file, like Windows Explorer does. If I wanted to edit the values I made a different window appear that allowed the user to set and reconfigure the selected item. This ment that the listview would responed to a double clik event.

This sould also be possible to do with a DataGrid, so you should now be able to do what you want :)
 
Share this answer
 
Comments
16041984 16-Aug-12 7:52am    
thx
16041984 3-Sep-12 6:31am    
i solved it myself by taking in array and using proc.start....thx for help

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900