how to make rows clickable, datagrid, in

I have created coding to read xml file, place it in dataset and put it in datagrid. However I want to make the rows clickable each row opens a specific page.

            XmlDocument loadXML = new XmlDocument();
            XmlNodeReader xmlReader = new XmlNodeReader(loadXML);
            DataSet dataSet = new DataSet();

            myDataGridviewV2.DataSource = dataSet;

Open in new window

Who is Participating?
rajapandian_81Connect With a Mentor Commented:

Refer the following links:

In datagrid's "OnRowCreated" event, you can add the "onclick" attribute for each row and redirect to different page on row click.

For eg.,
e.Row.Attributes.Add("onclick", "window.location.href='" + e.Row.Cells[0].Text + "'");

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.