单击gridview的链接按钮时如何从文件夹中打开垂直CV [英] how to open perticular CV from folder when click on link button of gridview

查看:75
本文介绍了单击gridview的链接按钮时如何从文件夹中打开垂直CV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在用户单击gridview的链接时显示候选人的简历.我在该文件夹中有简历的数量.怎么可能?
我有以下代码

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

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");
            }
        }



当用户通过名字搜索姓氏时,它将显示gridview,并且当单击链接按钮时,我想在MCword中显示该候选者的简历.... any help im newbie ..



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..

推荐答案

这里缺少很多信息,但是我可以为您提供我在模拟项目中所做的大致概述:

1.我从文件列表或SQL Server中获取了相关数据,并将这些项目存储在一个List(属于MyClass)中,该List包含我要显示的必要项目的所有属性.

2.我将ListView和GridView(WPF)一起使用,并将List(MyClass)绑定到它.

3.如果我单击某个项目以使选定的项目"发生更改,则不会,但我像Windows资源管理器一样更新了该文件的priview文件.如果要编辑值,则会显示一个不同的窗口,该窗口允许用户设置和重新配置所选项目.提到listview将对double clik事件作出响应.

这也可以与DataGrid一起使用,因此您现在应该可以执行想要的操作:)
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 :)


这篇关于单击gridview的链接按钮时如何从文件夹中打开垂直CV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆