Forum


10:13

Moderators
30/10/2007

Hello,
Every checkbox has uniquie id which is combination of
"jqg_"+rowid - where the rowid is the id of the row.
Use the appropriate command to disable it.
Best 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.
19:53

30/08/2009

After doing some research i tried something like this.
$("[id^=jqg_][disabled='']",ts.rows).attr("checked",true);
and on the grid i was setting the disabled property as
$(”#jqg_Q391″).attr(”disabled”, "true");
so that it doesn't check the boxes which i have disabled.
But when i click anywhere on the disabled row or i click on the top checkbox it highlights the rows and still sends me the rowId of the rows where checkbox is disabled.
Varun
11:37

I had to add this line in the setSelection method.
..........................................................................................
if( $("#jqg_"+pt[ 0 ].id).attr("disabled") ){
return;
}
.....................................................................................................
after these lines
$t.p.selrow = selection;
ia = $.inArray($t.p.selrow,$t.p.selarrrow);
if ( ia === -1 ){
///////////////// Modified code here ???????????????????????????????
-----
----
13:50

This is the correct behavior that the grid should take action. If the checkbox is disabled it should not select the rows, if it is doing it then that is not the proper behavior. Moreover wherever you have implemented that code to disable the checkbox each time you have to call "beforeSelectRow" handler.
Varun
03:18

Moderators
30/10/2007

Hello,
Will see what I can do.
The problem that I see is: if the row is selected and we disable the selection on that row (by example attaching a certain class) what we should do? I do not want to write additional method for this just to analyze if it has certain class – i.e
(”#myrow”,”#mygrid).addClass(”not-selected-row”)
I have answered to mayself (maybe) : before doing this we should check if the row is selected
Best 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.
08:35

Moderators
30/10/2007

Hello,
What I mean we should provide a mechanizm not to select a row instead if multiselect is set to true or false.
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.
08:50

Moderators
30/10/2007

Hello,
In order to be a clear what should be done.
When we disable a a row:
1.if the row is selected - deselect it
2. mark a row as not selectable
3. if we are in multi select mode - make the check box disabled.
4. If we click on the common check box - do not allow this row to be selected
5. set logic when we are in cellEdit not to allow editing.
6. set logic when we are inline edit not to edit that row
7. set logic in form edit not to load data an this row.
I think that this cover all the cases.
Best 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.
Most Users Ever Online: 715
Currently Online:
64 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