Link to specific row of table.

Link to specific row of table.

jamescjamesc Posts: 4Questions: 1Answers: 0

Hi there,

I have a DataTable where each row has an id. e.g.:
<tr id="abc123"><td>cell1</td><td>cell2</td><td>cell3</td></tr>
<tr id="def456"><td>cell1</td><td>cell2</td><td>cell3</td></tr>
etc.

If this wasn't a DataTable but just say a set of HTML paragraphs I could give a link like http://www.example.com/foo.html#def456 to have this be the location on the table that it scrolled to. This is how lots of HTML tables of contents work.

How can I do the same with a DataTable? If I have an id attribute on every row I want to be able to give something like http://www.example.com/foo.html#def456 and end up with the correct page showing on a paginated datatable.

To be clear, I'm not interested in turning that row into a link, linking to other things, nor do I want to present only this row. I just want when someone goes to a particular URL for them to arrive at that point in the whole table.

Any ideas?

This discussion has been closed.