Forum


12:43

18/11/2010

Hello all,
i've been searching if someone already had the problem but I didn't find...
I currently have a problem with Jqgrid.
I do an extraction data from a database:
Example
select id, firstname, lastname, from users; <-- id is the email so NOT a numeric key
If I give a recordset data from the above query to Jqgrid it's impossible to have a checkbox automatically checked on select row (standart behaviour of Jqgrid).
Instead if I don't select a field called "id" or more surprisingly if i select a numeric field called "id" it solves the problem..
We currently have a lot of db queries so that would be impossible to us to changed all of them..by removing id's fields.
That's the reason why i'm asking comunity's help in order to solve this problem by changing Jqgrid's behaviour.
Thank you
13:38

18/11/2010

It seems it can be a problem linked to addRowData method.
Example:
var myfirstrow = {invid:"1", invdate:"2007-10-01", note:"note", amount:"200.00", tax:"10.00", total:"210.00"};
jQuery("#myDiv").addRowData("not_numericID", myfirstrow);
I think it's what is happening (internally) if addRowData's first parameter (id) is not a numeric one there's a conflict and you cannot have a checked checkox on select row.
But how to fix it?
Because in my case i don't call explicitaly addRowData , i only give a recordSet to Jqgrid.
12:38

18/11/2010

I'm sorry to see that no one helped me, I was hoping there were a comunity ?
Fortunately I found a solution (by myself ).
Moreover I would like to say that I also notice a bug on jqgrid.
Please try this test:
-On a multiple selection do a clic on all rows (except header) to check it
Then
-Do a click on header checkbox (will do nothing because all rows should have already been selected).
-Unselect all rows by clicking on each checkbox (except header one).
You should have no row selected and should have checked header checkbox
Try to click on "Get Selected id's" you will have an id even though no row is selected 😉
You can try here: http://trirand.com/blog/jqgrid.....qgrid.html
Most Users Ever Online: 715
Currently Online:
46 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