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
Name clash between "id" and Indonesian language code (id)
11/12/2009
16:07
Avatar
karabot
Member
Members
Forum Posts: 15
Member Since:
06/11/2009
sp_UserOfflineSmall Offline

Hello,

I have run into relatevely small problem but nonetheless worthy to mention.  There seems to be a name class between the internal id name for identifying rows and the Indonesian language code, which is also id.  The problem is shown when such language codes are set as column names.  I tried renaming the id to row_id using the jsonReader option with no effect.  So the only way I can think of fixing this is to add a prefix to such language codes when used as columns.

If you have run into this problem or similar problems and you have a better (less intrusive solution) please let me know.

TIA,

George

11/12/2009
17:48
Avatar
karabot
Member
Members
Forum Posts: 15
Member Since:
06/11/2009
sp_UserOfflineSmall Offline

I have another comment/question.  When I edit a row and I save it, on the server side, I still see id instread of row_id as I have stated in the jsonReader.  Any easy way I can have the row_id passed instead of id?

George

13/12/2009
17:36
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Hello,

Thank you for this. This is one thing that should be corrected. For now we put the id hard. We plan to change this in a way that the user will set it in a way what they want. Maybe will be available in the next release.

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

13/12/2009
19:49
Avatar
markw65
Member
Members
Forum Posts: 179
Member Since:
30/07/2009
sp_UserOfflineSmall Offline

There is a workaround.

Your beforeSubmit handler can delete the postdata.id field, and add postdata.row_id.

You need to be careful handling the "add" case (rather than edit), because the grid differentiates the two by checking whether postdata.id == "_empty".

You can solve that by /not/ deleting the "id" field (in which case the server will see both id, and row_id), or by adding it back in your afterSubmit function.

Mark

13/12/2009
21:25
Avatar
karabot
Member
Members
Forum Posts: 15
Member Since:
06/11/2009
sp_UserOfflineSmall Offline

Thank you Tony!

Mark, I ended up changing both the language column names by adding a prefix and changing the id input parameter to row_id as soon as the execution enters the server code.  This pretty much guaranteed there will not be any surprises such as the one you mention :).

Thanks again for the responses guys.

George

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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