I suggest you ...

actions formatter pass beforeEditRow

The actions formatter should allow option of beforeEditRow. This could be used to set cell editable/non-editable during inline edit from edit action icon.

Only change needed to implement is to add new field to "actop" in "rowactions" function in jquery.fmatter.js as in:

var actop = {
keys: op.keys,
---> beforeEditRow: op.beforeEditRow,
oneditfunc: op.onEdit,
successfunc: op.onSuccess,
url: op.url,
extraparam: op.extraparam,
aftersavefunc: saverow,
errorfunc: op.onError,
afterrestorefunc: restorerow,
restoreAfterError: op.restoreAfterError,
mtype: op.mtype
};

Usage would be:

colModel: [
{ name: "action",
formatter: 'actions',
formatoptions: {
beforeEditRow: function(p, rowid) {
if (rowid.substring(0,3) == 'jqg') //new row
$('#users').setColProp('name', {editable:true});
else // existing row
$('#users').setColProp('name', {editable:false});
}

2 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    ChuckChuck shared this idea  ·   ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base