Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
gridComplete Event
03/04/2009
06:25
Avatar
rojoba
Member
Members
Forum Posts: 15
Member Since:
06/02/2009
sp_UserOfflineSmall Offline

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

03/04/2009
07:17
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

03/04/2009
08:49
Avatar
rojoba
Member
Members
Forum Posts: 15
Member Since:
06/02/2009
sp_UserOfflineSmall Offline

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

03/04/2009
10:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

06/04/2009
03:39
Avatar
rojoba
Member
Members
Forum Posts: 15
Member Since:
06/02/2009
sp_UserOfflineSmall Offline

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

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information