Wednesday, May 30th, 2007
TableKit: Prototype Table Tweaking
TableKit is a Prototype based library that lets you create sort, inline edit, and resize tables.
There is a simple unobtrusive way to use the component:
-
-
<table class="sortable resizable editable">
-
And, you can get lower level and work directly with the API via the TableKit objects.













Hi, cant get to the link, is there another site its hosted on?
@ Ilia:
This is the original one: http://tetlaw.id.au/view/blog/table-sorting-with-prototype/, maybe this one works for you?
The links works perfect for me…
Hey this thing rocks :)
Would be cool if this could integrate with a MySQL database :D
Alex: I think you have some basic reading to do, because unless that was a joke you’re prime for your first class of web programming. First topic probably will be “Why you’re completely wrong in everything you think you know about MySQL, PHP, JS, HTML and CSS”.
Because it took me exactly 2 seconds to integrate this with a MySQL database for everything but the edit. And an additional 15 minutes for the edit part.
Outstanding effort.
Note:
1) Resizing is very crappy in Opera (9.20), as it is extremely difficult to ‘grab’ the correct place
2) In IE6, resizing is limited by the width of text content of a table. This doesn’t occur in other browsers.
Very impressive. The only thing that I think is missing is some sort of post edit renderer, since editing the urgencies leaves you with some weird looking results.
A cool extra feature:
Column reordering for TableKit
http://vlad.bailescu.ro/javascript/htmlkit/
@Eduo: the speech bubbles point downwards
Angel, glad you liked it. I’ve corrected the url though, it’s: http://vlad.bailescu.ro/javascript/tablekit/
Does anyone have handy the proper syntax for running this tablekit with AJAX? I’m still pretty new at all this, but I have a php page that has a table on it and depending on the button the user hits, the same table populates with different data from an xml file.
Same old story, it works fine on it initial load, but anytime i re-populate, the sorting functionality goes away. I’ve tried several things, but _autoload doesn’t seem to do anything for me and if I call the TableKit.Sortable.init(’tableid’) i get nothing either. I’ve been scouring the interent for hours these past couple days. Can anyone help?
thanks