Forum

July 12th, 2025
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_Related Related Topics sp_TopicIcon
JQGrid w/out SQL -> Use JSON file on server
Tags: json
30/06/2011
16:23
Avatar
b0ot
New Member
Members
Forum Posts: 2
Member Since:
30/06/2011
sp_UserOfflineSmall Offline

I was hoping someone might be able to explain how I could bypass having a MySQL (or other type of database) with JQGrid and just directly read/write to a JSON file that lives on the server.

30/06/2011
16:49
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

You can just save the JSON data in the file. Depend on the jQuery version and from the settings on your web server it can be important which file extenstion you choose for the file having JSON data. Try to use .json file extension. See the demo which use the JSON file as an example.

Best regards
Oleg

30/06/2011
16:57
Avatar
b0ot
New Member
Members
Forum Posts: 2
Member Since:
30/06/2011
sp_UserOfflineSmall Offline

OlegK, Thanks for the response but it made me think of a couple of questions I had.

=> If you allow the cells to be editable in the grid, with this also change the JSON file on the server when the changes were saved?

=> What would happen if another user edited the grid while I was viewing it, would the changes immediately be shown on my view?

=> (Similar) If the server modified the JSON file (I have bash scripts that occasionally change my JSON files) would the user see the changes right away.

30/06/2011
17:16
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

I recommend you to use file instead of the database only in case of grid which has no editing features.

If you do want use JSON-file for editing the server code have to lock the file during the file modification. The exact implementation are depend on the language which you use.

The implementation of concurency is not exist per default if you use and database. Look at here to understand which things should be done to implement optimistic concurrency.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
23 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