Forum


06:25

06/02/2009

Hi
(i)
How do I have a table that doesn't load data? At the moment I use datatype:'clientSide'... but still get the 'loading...' message. I just want an editable grid with say 10 empty rows.
(ii)
If there are no rows in the grid, the gridComplete does not fire. However, it fires each time I call addRowData(). Is this correct?
I'd like to insert the empty rows when the gridComplete fires, but can't seem to do that.
Thanks in advance,
Roger
07:17

Moderators
30/10/2007

Hello,
According to docs:
"This fires after all the data is loaded into the grid and all other processes are complete"
If there is no data of any kind (xml, json,array) this event will no fire.
In order to use it set
datatype: 'jsonstring' and put empty string to use gridComplete
After this operation the datatype will be set automatically to clientSide.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
08:49

06/02/2009

Hi Tony
Thanks for that. I did read the docs and that exact sentence.. I understood it to mean that the gridComplete will fire even if I don't have data to load. Basically relied on the "other processes" part. 🙂 I tried your suggestion, however, specifying the datatype as 'xmlstring' or 'jsonstring' and assigning datastr to '' throws a syntax error. If datastr is null, the loading message doesn't go away. The gridComplete event still doesn't fire. Here is what I have...
datastr:'',
datatype:'xmlstring',
width: uniflo.form.calculateGridWidth($('#correctionList'), 5),
height: uniflo.form.calculateGridHeight($('#correctionList')),
shrinkToFit: false,
hidegrid:false,
imgpath: uniflo.config.GridImgPath,
pager: jQuery('#correctionPager', {pginput:false}),
cellEdit: true,
cellsubmit: 'clientArray',
caption: 'Correction Lines',
gridComplete: function()
{
alert('yo');
}, <...>
Thanks again,
Roger
10:14

Moderators
30/10/2007

Hello,
datatype: xmlstring,
datastr: '""' ----> i.e. ' "" ' string in string
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
03:39

06/02/2009

Hey Tony
Oh, THAT empty string you mean :)... the gridComplete event still doesn't fire. The loading message doesn't go away, so I'm thinking it's still in a loading state and gridComplete cannot be fired. I've decided to put my code outside the grid config and also added "loadui: 'disable'" to not display the loading message. Not sure if this is the ideal as I have no idea what I'm doing wrong.
Regards,
Roger
Most Users Ever Online: 715
Currently Online:
61 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66