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

Recommended Answers

Try setting the DataPropertyName first, not last.

Jump to Post

All 4 Replies

Try setting the DataPropertyName first, not last.

setting datapropertyname first is not making any difference..

Works for me

DataGridViewLinkColumn dl = new DataGridViewLinkColumn();
                dl.Name = "LIZ";

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 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.