View Full Version : problem with paged grid display

27 Sep 2006, 10:45 AM
I'm trying to return a grid, that's really just 1 column... eventually I'm going to be populating 2 other grids on the same page.

My "grid" loads, but the data never gets plugged in.

My code looks like this.

datessm = new YAHOO.ext.grid.SingleSelectionModel();

datescm = new YAHOO.ext.grid.DefaultColumnModel([
{header: "Date", width: 223}

datescm.defaultSortable = false;

datesdm = new YAHOO.ext.grid.XMLDataModel({
tagName: 'date',
totalTag: 'totalCount',
id: 'id',
fields: ['date']

datesdm.initPaging('/cgi-bin/dates.cgi', 30);
datesdm.setDefaultSort(datescm, 1, 'DESC');
datesdm.addListener('load', datessm.selectFirstRow, datessm, true);

datesGrid = new YAHOO.ext.grid.Grid('dates-grid', datesdm, datescm, datessm);


And the xml being returned on the loadPage looks like this (pulled from firebug)

<dates><date id="20060926" date="20060926" />
<date id="20060925" date="20060925" />
<date id="20060924" date="20060924" />
<date id="20060923" date="20060923" />
<date id="20060922" date="20060922" />
<date id="20060921" date="20060921" />
<date id="20060920" date="20060920" />
<date id="20060919" date="20060919" />
<date id="20060918" date="20060918" />
<date id="20060917" date="20060917" />
<date id="20060916" date="20060916" />
<date id="20060915" date="20060915" />
<date id="20060914" date="20060914" />
<date id="20060913" date="20060913" />
<date id="20060912" date="20060912" />
<date id="20060911" date="20060911" />
<date id="20060910" date="20060910" />
<date id="20060909" date="20060909" />
<date id="20060908" date="20060908" />
<date id="20060907" date="20060907" />
<date id="20060906" date="20060906" />
<date id="20060905" date="20060905" />
<date id="20060904" date="20060904" />
<date id="20060903" date="20060903" />
<date id="20060902" date="20060902" />
<date id="20060901" date="20060901" />
<date id="20060831" date="20060831" />
<date id="20060830" date="20060830" />
<date id="20060829" date="20060829" />
<date id="20060828" date="20060828" />

Unfortunately I can't put the full thing online as it's on an internal server. Any ideas? I get the "Dates" header, and the toolbar at the bottom, but the table never populates.

Edit: It always says it page 1 of 1 also. Like it's never actually reading and acting on the data once it receives it.

27 Sep 2006, 11:22 AM
nevermind... turns out to be a browser issue, not an issue with the code.

27 Sep 2006, 2:45 PM
Was it caching in IE?

27 Sep 2006, 5:07 PM
No it was something weird with the 64bit version of Firefox I was running on Fedora Core 5. For some reason the javascript engine on it is umm inconsistent I guess.

I did find out before I left work today that my app doesn't render correctly in Konqueror, and breaks in IE, but haven't had time to investigate further.

I'm using 3 grids, built into a similar splitter setup like you're using for your forums. The left panel is a grid with 1 column, the top panel is a grid with 4 columns, and the bottom panel is a grid with 3 columns.

In Konqueror the top panel's grid get's squished together, while the other two display mostly correctly. I say mostly, because the header doesn't display for all the grids.

In IE only the left panel grid displays, and then it errors out. Off the top of my head I believe the error reported is something like "config[...].hidden is null" or something similar. I just saw it before i closed down for the day though, so am not sure.

Really as long as i get it working in firefox (which it is working fine in that browser) that's acceptable. It's a log viewing tool and most of us in our Operations department use firefox anyway.