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
Help with multiselect and getting selected ID's
20/12/2010
16:43
Avatar
Impulse9
Ukraine
Member
Members
Forum Posts: 3
Member Since:
20/12/2010
sp_UserOfflineSmall Offline

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?

Example of tableImage Enlarger

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:

UPDATE goods SET selected=1 WHERE id='selr1'

or store expression in array?

And please, give me some words about selecting rows with holding Shift button. Is that possible?

22/12/2010
09:28
Avatar
Impulse9
Ukraine
Member
Members
Forum Posts: 3
Member Since:
20/12/2010
sp_UserOfflineSmall Offline

People, please help!

Tell me in which direction "dig in" - to understand, how to pass ID's from selected rows to PHP!

Theoretically it's AJAX, json data format...but how?

28/12/2010
13:59
Avatar
001priyank
New Member
Members
Forum Posts: 2
Member Since:
28/12/2010
sp_UserOfflineSmall Offline

let me understand your problem

You want to send all the selected rows to your php page on some button click? Is it?

28/12/2010
15:41
Avatar
Impulse9
Ukraine
Member
Members
Forum Posts: 3
Member Since:
20/12/2010
sp_UserOfflineSmall Offline

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. 

28/12/2010
16:07
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

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 

Forum Timezone: Europe/Sofia

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

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

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information