Forum
22:23
07/11/2013
- jqGrid is created and 2 rows are shown
- one row is selectable and the other is disabled and color is gray
- $("#"+row_id_string).attr('disabled', true);
- $("#"+row_id, grid).css({'background-color':'#f0f0f0'});
- $grid.jqGrid("clearGridData", true); is called
- now i need to load the grid with new data and restore the original styling and attributes
- i call $grid.jqGrid({...}) and then $grid.jqGrid('setGridParam', {data : gridData}).trigger('reloadGrid');
- no rows should be disabled
- no rows should have color gray
- but my reloaded grid still has one diabled row with gray color..
i tried gridUnload which removes the grid from view and gridDestroy removes the html..both of which i do not need..
data is loading properly..what am i supposed to do..!
12:07
Moderators
30/10/2007
Hello,
Do you have any jqGrid events called?
It seems you call again
("#"+row_id_string).attr('disabled', true);
Please check your conditions on which case you do this
Can you please provide us a link to the problem?
Regards
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.
21:16
07/11/2013
Thank you Tony for replying and i am sorry i didn't notice your reply as i found a solution. Here is what i did.
i added below code in a function and called it when creating the dialog..
var rows = $j("tr.jqgrow", $table[0]);
for (var i = 0; i < rows.length; i++) {
var row_id_string = rows[i].id;
$j("#" + row_id_string).attr('disabled', false);
$j("#" + row_id_string, $table).addClass('enabled-background-color');
}
$table.jqGrid('resetSelection');
$table.jqGrid("clearGridData", true);
Most Users Ever Online: 715
Currently Online:
25 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