• 0

Listview control


Question

I want to load all the players in my database into a listview so i can sort them accordingly. But i don't know of any ListView Controls for HTML (im not using aspx, or ASP.net, just plane HTML/PHP in Notepad++. Helping me pass exams :p). Can anybody recommend/help me find one?

Thanks :)

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

<select size="5">
 <option value="1">1</option>
 <option value="2">2</option>
 <option value="3">3</option>
 <option value="4">4</option>
 <option value="5">5</option>
</select>

Size is the height of the list box in items.

Link to comment
Share on other sites

  • 0

<select size="5">
 <option value="1">1</option>
 <option value="2">2</option>
 <option value="3">3</option>
 <option value="4">4</option>
 <option value="5">5</option>
</select>

Size is the height of the list box in items.

I mean listview like this;

DisplayDirectoryinfoinaListView.PNG

Link to comment
Share on other sites

  • 0

Hmm... as far as I'm aware there is no multi-column list view in HTML and in that case your best bet is just using a <table> object. For each of the headers you would have your own custom style link (e.g page.php?sort_a=ASC) and then just rebuild the table with that sort. As far as being able to select items you would want to add an additional column with a check box control for each row. Hope that at least gets you on the right track or puts an idea in your head :)

Link to comment
Share on other sites

  • 0

I'd go for a regular <table> using <thead>, <th>, <tr> and <td> and let the column sorting be handled by a jQuery plugin. That way, your sortable table will degrade to a static table when JavaScript is not available but at least it'll still be usable.

jQuery Tablesorter seems to do this very well and provides a lot of flexibility. The latest version dates back from 2008 but it seems to have survived the various jQuery updates. Why don't you give it a try? :)

Link to comment
Share on other sites

  • 0

Sorry for (unnecessarily) bumping this week-old thread but I thought I should post some more up-to-date information about this table sorting question.

The jQuery UI team has reported to be working on a new Grid widget which will do sorting, paging, filtering etc. In their blog post, they also reference some existing jQuery plugins which already implement (some of) these functionalities. Tablesorter is in that list but there are also more complete, better looking plugins which are better maintained. Apparently they don't like calling themselves "table" plugins, they all prefer the naming "grid" which is probably why I didn't find them with Google. :p

I'd recommend these in favour for the no longer maintained jQuery Tablesorter. However, if you can afford it, you could also wait for the next version of jQuery UI which should bring the new Grid widget.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.