Click here to Skip to main content
15,908,444 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I want to make a column in datagrid into a hyperlink, I have tried the following codes, but it seems that the column did not change into a hyperlink. What is wrong with my codes?

C#
XmlReader reader = XmlReader.Create("C:\\Users\\Visual\\Documents\\Visual Studio 2010\\Projects\\FTP Setup\\FTP Setup\\bin\\Debug\\ftpSetup.xml", new XmlReaderSettings());
DataSet ds = new DataSet();

ds.ReadXml(reader);
dtgFTP.DataSource = ds.Tables["Details"];

//to create a hyperlink in datagrid
DataGridViewLinkColumn link = new DataGridViewLinkColumn();
link.DataPropertyName = "FTP_ID";
link.Name = "FTP_ID";
link.LinkColor = Color.Blue;
dtgFTP.Columns.Add(link);
Posted

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