Mahesh Varia
Mahesh Varia

Reputation: 31

Sorting Dynamically generated HTML Table

I am generating a dynamic HTML table string and displaying inside a div. I am assigning ID and runat server in that string. eg.

string s="<table id='tblAll' runat='server'></table>".

This string is generated on some different page, and its passed as XmlhttpResponseText

I want to apply sorting on this table, It would be great if any one can help me out. Thanks

Upvotes: 1

Views: 1838

Answers (2)

Tom
Tom

Reputation: 44533

Use the jQuery tablesorter plugin, and instead of selecting the table via it's Id, you can select it via the containing div and a child selector:

$("div#container table").tablesorter();

Upvotes: 0

rahul
rahul

Reputation: 187020

You can use jQuery tablesorter plugin

Upvotes: 4

Related Questions