Sending additional parameters to editurl on JQgrid

后端 未结 3 1364
天涯浪人
天涯浪人 2020-12-18 14:29

My problem now is trying to send the ID (editable: false) of a row when editing that row.

For example, i have a grid with columns userid(editable

相关标签:
3条回答
  • 2020-12-18 15:01

    Passing values in the GET string worked for me.

    editurl: '/ajax/update?line=1',
    
    0 讨论(0)
  • 2020-12-18 15:08

    in your onSelectRow callback, you can modify the editUrl to be whatever you want, including passing in the ID you need.

    $("#rowed3").jqGrid('setGridParam', {editurl:'whatever/url/you/need/with/the/id'});
    

    jqGrid will add all the other nececessary params to that editurl for you.

    0 讨论(0)
  • 2020-12-18 15:10

    You can use

    hidden: true, editable: true, editrules: { edithidden: false }, hidedlg: true
    

    in the definition of the piezaId (ID) column. The parameter hidedlg is currently not real needed, but can be useful if you decide the use other jqGrid features.

    0 讨论(0)
提交回复
热议问题