Forum


16:43

20/12/2010

Greetings to all!
In first, thanks to Tony for his efforts. jqGrid is very useful in right hands. Sorry for my English.
And thats the question is:
How to transfer ID's of selected rows to PHP – on MouseClickButton, i.e., in jqGrid terms – onSelectRow.
Here we are, the table, jqGrid ver 3.5:
Fulfilling such things, as popup full-sized images for onMouseOver event, saverow.php - working good (thanks again to Tony and others), and also saverow.php fulfilling task of assigning flag in hidden column – so, after clicking many rows and pushing "Sort selected rows" button – they going first in grid, so user can proof his choice or deselect some, and only then press "Save grid" or some.
But it takes many time – select each row and press Enter. Mayby exist much easier way?
I carefully reading all jqGrid examples and manuals, but cant find solution.
Iis it possible – get selected ID to MySQL DB via PHP – on SelectRow event ? Each row's ID then go to the base, and then "Sort selected rows" and so on.
Or more useful – get array of selected ID's to the PHP – via assigned button?
I'am not good in AJAX and jQuery, that's why i beg your pardon, and ask to explain in detail, or give example of code.
My current code is:
onSelectRow: function (id)
{ if (id && id != lastSel)
{
jQuery('#list').setCell (id,'selected','1');
var selr1 = jQuery('#list').getGridParam('selrow');
if (selr1) alert(selr1);
What i need to do instead alert expression – call AJAX function or function similar - saverow.php, maybe to immediately perform SQL like that:
or store expression in array?
And please, give me some words about selecting rows with holding Shift button. Is that possible?
15:41

20/12/2010

001priyank said:
let me understand your problem
You want to send all the selected rows to your php page on some button click? Is it?
Yes, exactly!
Even more (if this possible):
1. Button click (significant button, named "Get selected rows")- send all the selected rows to php page.
2. Button click (on the row) - send only selected row to php page.
16:07

10/08/2009

Look at this old answer having the demo (the sending of data to the server are commented in the demo). Probably it will help you to solve the problem.
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
58 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