Hi,
On my desktop aplication I'm trying to open a file.
I`d like to do it just by clicking on the contents of a cell in a datagridview with file`s path stored on a string like "c:\Control\Borrar.txt" but nothing is happening.
Can anyone, please, help me? I'm just starting to write code seriously and I need some help. I paste a piece of code of what I did working on C# in VS Express 2013 for desktop applications.
Thanks on advance.
private void dgv_EPIs_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
int i = dgv_EPIs.CurrentCellAddress.X;
if (dgv_EPIs.Columns[i].HeaderText == "Registro")
{
OpenFileDialog archivo = new OpenFileDialog();
archivo.FileName = dgv_EPIs.CurrentCell.Value.ToString();
archivo.OpenFile();
}
}
SPANISH TRANSLATION (just for improve opportunities of receive any answer):
En una aplicación de escritorio estoy intentando, cuando
aprieto el contenido de una celda de un DatagridView que contiene la ruta del archivo en una cadena
("c:\Control\Borrar.txt"),abrir un archivo
pero no ocurre nada.
¿Me puede alguien aclarar porque pasa esto, por favor?
Estoy creando el codigo que pego abajo en C# y con Visual Studio Express 2013
Saludos y gracias de antemano.