I am able to add a link to a datagridview but the problem is I want all the links with same name. But I am getting the name from database data

DataGridViewLinkColumn linkColumn = new DataGridViewLinkColumn();
            linkColumn.Text = "View";
            linkColumn.HeaderText = "View";
            linkColumn.Name = "View";
            linkColumn.DataPropertyName = "PART_NO";

This PART_NO is coming from database I want to change it to some text like "view".

can anyone help me...

Try setting the DataPropertyName first, not last.

setting datapropertyname first is not making any difference..

Works for me

DataGridViewLinkColumn dl = new DataGridViewLinkColumn();
                dl.DataPropertyName="Status";
                dl.Name = "LIZ";
                dataGridView1.Columns.Add(dl);

So, something else is causing yours to overwrite the column.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.