Jul
25

LiveGrid

Posted in Ajax, LiveGrid by Chris van de Steeg

19


So when I first saw Rico LiveGrid I fell in love with it!

Though, trying to implement it on my site, immediately some things started irritating me:

  • No support for the mousewheel
  • Your html-output needs to be serialized (ie. use <a> for <a>)
  • I don’t want the page itself to define the item height by using empty rows, I want it to calculate the height as soon as the first items load
  • Very strict html required (it must be a table with tr’s)
  • The use of Rico.AjaxEngine: ok, so it’s a cool script and everything. But imho it’s kind of outdated and bloated (all respects though!). Prototype is being build further, the effects part of prototype has already been seperated from the core and is now maintained at script.aculo.us
    Prototype’s Ajax.updater does just as good a job as the Rico.AjaxEngine, etc.

So I forked the Rico.LiveGrid and created a version that works directly with prototype, has mousewheel support, and supports any kind of html (in theory ;) ). I don’t have any time to setup a demo right now, but will do so soon.

Download here
Due to popular demand ;) :
Demo here


19 Responses to “LiveGrid”

Dan G. Switzer, II says:

Jul 26, 2005

Do you have demo page set up yet?



ceejayoz says:

Jul 26, 2005

Don’t suppose there’s a demo?



Alley says:

Jul 26, 2005

Now there’s a demo ;)



louis says:

Jul 27, 2005

could you give us the source of the file getrows.php please ?



louis says:

Jul 27, 2005

i got an error message of javascript in IE (win xp) :

line 37 :
myGridUpdater is not defined

:’(



Alley says:

Jul 27, 2005

@louis: myGridUpdater js error should be gone now… I’ll put up the getrows.php source tonight, though it’s a really dumb script… the output is way more important ;)

I’ll put it up anyway within a few hours



louis says:

Jul 29, 2005

Thanks a lot !



louis says:

Aug 10, 2005

did you upload the files ? thanx :)



Brian Murray says:

Aug 12, 2005

I’m not completely sure, but I think there is a bug at line 375.
callParms = this.additionalParms + '&' + this.additionalParms;
Perhaps it should be something like
callParms = this.callParms + '&' + this.additionalParms;



Brian Murray says:

Aug 12, 2005

Sorry, cut & paste error. The correct line is probably
callParms = callParms + '&' + this.additionalParms;



Roman Hawk says:

Aug 15, 2005

Alley, I really appriciate your work. It’s great.

But there is one issue you didn’t address to – memory leaks in IE. There is a good article on the topic:
http://jgwebber.blogspot.com/2005/01/dhtml-leaks-like-sieve.html or some stuff from Microsoft

In general – avoid storing links to DOM objects (this.scrollerDiv) or clear all listeners (unplug method) on page unload.



George Belardo says:

Oct 25, 2005

I’m looking for a way to include images and hypertext links inside the grid. The Yahoo search demo shows me that it’s possible, but when I try to do something like add an image, the grid stops working. Can you provide any code samples of what I have to do in order to get this to work?



randy says:

Jan 27, 2006

DITTO:

I’m looking for a way to include images and hypertext links inside the grid. The Yahoo search demo shows me that it’s possible, but when I try to do something like add an image, the grid stops working. Can anyone provide any code samples of what I have to do in order to get this to work?



Chris D says:

Feb 14, 2006

I have looked at this and the original LiveGrid site and demos, but I am still unclear about the backend code that has to be written. In this demo it’s a reference to a php page. In my case, I will be writing the code in Java. I assume that I need to write some sort of function that performs the query and returns the resultset, but formatted in a table structure (using the results to build a string representing html table rows and cells). If my query is returning 100,000 rows, I am not understanding where the Ajax comes into play. Do I need to write my query so that it only retrieves results x through y, or is this taken care of? If it’s taken care of, then the whole purpose is defeated since I’m returning all 100,000 rows from the server. As you can see, I’m quite confused about how we retrieve the actual results. Anyone’s help would be much appreciated!



Alley=>Chris van de steeg says:

Feb 14, 2006

@Chris D:
Your server side script will receive the parameters
‘offset’ and ‘page_size’ (the names are configurable)

You need to return only the records in that range



Mike W says:

Mar 25, 2006

Alley, Thanks for the demo, did you ever get a chance to post the back-end code? Maybe I’m just missing the link.



Alley=>Chris van de steeg says:

Mar 26, 2006

@Mike W: please look at http://blog.ilikeu2.nl/2005/09/10/livegrid-now-comes-with-xslt/ for complete demo



Kristian says:

May 25, 2006

<Quote> No support for the mousewheel </Quote>

I find this annoying too. However, mouse wheel scrolling works when you hover the mouse over the scrollbar instead of the table..



lunk says:

Nov 15, 2006

In Mozilla I don’t see the scroll wheel, any known issues with Mozilla?



Leave a Reply