Reputation: 1041
I have something like authorization and lets say if the user doesnt have edit authorization, then I dont want to provide the inline edit option. How is this possible.
if(NotAuthorized)
{ $grid.jqGrid('hideCol', "act");}
UPDATE Have updated the answer as per suggestion below
function evaluateAuthorization(authorizations) {
$("#gridList").find(".ui-inline-edit,.ui-inline-del,.ui-inline-save,.ui-inline-cancel")
.addClass("ui-state-disabled")
.prop("onclick", null)
.prop("onmouseover", null)
.prop("onmouseout", null);
}
This got me what i wanted.
Upvotes: 0
Views: 59
Reputation: 221997
It I understand you correctly you can disable the buttons inside of loadComplete
. The code could be about the following
loadComplete: function () {
$(this).find(".ui-inline-edit,.ui-inline-del,.ui-inline-save,.ui-inline-cancel")
.addClass("ui-state-disabled")
.prop("onclick", null)
.prop("onmouseover", null)
.prop("onmouseout", null);
}
Upvotes: 1