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
Multiselect : how to pre-select row
08/06/2010
13:32
Avatar
mfej74
Geneva
Member
Members
Forum Posts: 14
Member Since:
06/05/2010
sp_UserOfflineSmall Offline

Hi,

I need help for two actions.

i use multiselect on multiple page so i have two problem to resolved :

I have made a function which call an ajax to memorize or unmemorize the id selected with the function onSelectRow.

        $function .= ',multiselect:true';
        $function .= ',onSelectRow : function(id){
                                      jQuery.ajax({type: "POST",
                                         url: "jqGridSelect.php",
                                         data: "idSelected="+ id
                                        });
                                }';

But this function is not called when you click on check box which select or deselect all the row (in the header column). There is a way to that when you click on this check box, the function onSelectRow is called or there is way to disabled this checkbox.

And the second question is  : how to "pre-select row" when you are in multiselect and json mapping. I want to preselect row, if the user plays with navigation button.

thanks for your help

fred

09/06/2010
12:33
Avatar
mfej74
Geneva
Member
Members
Forum Posts: 14
Member Since:
06/05/2010
sp_UserOfflineSmall Offline

To avoid this problem, i try to use scroll. But i have again the same problems.Confused

When you click on the "check box select all" , the onload is not called.

When the user has selected the row, i generate a new grid with only the selected row for confirmation. if the click on back, i want to turn back to previous grid with the line already selected.

Nobody have an idea ? Wink

Thanks

Fred

16/06/2010
13:58
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

1. Please check the onSelectAll event

http://www.trirand.com/jqgridw.....iki:events

2. check  setSelection method

http://www.trirand.com/jqgridw.....ki:methods

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.

28/07/2010
11:52
Avatar
mfej74
Geneva
Member
Members
Forum Posts: 14
Member Since:
06/05/2010
sp_UserOfflineSmall Offline

Hi,

I'm back to the project.

Thanks for your help. SelectAll work correctly.

But i don't succeed with setSelection. I have tried like in the multiselect exemple from advanced, but nothing happens and i have no errors.

I tried : jQuery("#genDataGrid").setSelection(1);

or jQuery("#genDataGrid").jqGrid("setSelection","1″); to selet Id 1 but nothing happend.

I have the version 3.6 of JqGrid

I send data by json.

Probably the problem is comming from here.

I send the data like this :

        $returnObj = new stdClass();
         $returnObj->page = $pager->getCurrentPageNumber();
        $returnObj->total = $pager->count();
        $returnObj->records = $pager->getTotalItemCount();
        $i=0;
        foreach ($rows as $rowObject) {
            $row = (array) $rowObject;
            $returnObj->rows[$i]=$row;
            $i++ ;
        }
        return json_encode($returnObj);

And the option of JSONREADER are :

,jsonReader:{repeatitems:false,id:"0″} (id is always the 1st column of the row)

thanks for your help.

fred

03/08/2010
17:10
Avatar
mfej74
Geneva
Member
Members
Forum Posts: 14
Member Since:
06/05/2010
sp_UserOfflineSmall Offline

i found my problemLaugh

i didn't put the function in loadcomplete.Confused So it was never called.

, loadComplete: function(){ jQuery("#genDataGrid").jqGrid("setSelection","3");

stupid error Embarassed

fred

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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