Forum


13:32

06/05/2010

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 .= ',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
12:33

06/05/2010

To avoid this problem, i try to use scroll. But i have again the same problems.
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 ?
Thanks
Fred
13:58

Moderators
30/10/2007

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.
11:52

06/05/2010

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->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
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66