开发者

Get jqgrid DOM ID from event triggers

开发者 https://www.devze.com 2022-12-08 06:38 出处:网络
I\'m extending jqgrid default options: $.extend( $.jgrid.defaults, { datatype: \"json\", jsonReader: { root: \"rows\",

I'm extending jqgrid default options:

$.extend(
    $.jgrid.defaults,
    {
        datatype: "json",
        jsonReader:
        {
            root: "rows",
            page: "page",
            total: "total",
            records: "records",
            repeatitems: false,
            cell: "cell",
            id: "id"
        },
        height: 'auto',
        rowNum: 20,
        recordtext: 'record',
        loadtext: 'loading',
        imgpath: 'path',
        viewrecords: true,
        multiselect: true,
        postData: { random: Math.random() },
        rowList: [10, 20, 30, 50],
        beforeRequest: function() { OnBeforeRequestFunct(); }, 
        onPaging: function开发者_高级运维() { OnPagingPersonalize(); },
        gridComplete: function() { if(editedRowIds.length > 0)
                                        refreshSelection(); 
                                 }
    }
);

So i need to pass caller jqgrid id to OnBeforeRequestFunct() when trigger event beforeRequest is fired from grids.


So you want to pass the ID of the grid's DOM element? Have you tried:

OnBeforeRequestFunct(this.id);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号