JqGrid.info_dialog is not a function, do I need to call an extension?

I am trying to use info_dialogin my jqGrid but am looking TypeError: $(...).jqGrid.info_dialog is not a functionat the console.

I (!) Have not defined my own function info_dialog. But I can see it in $.extend($.jgrid, ...like here , so I expected it to be available by default.

info_dialog : function(caption, content,c_b, modalopt) {
        var mopt = {
            width:290,
            height:'auto',

Do I have to somehow enable it for the grid? Or what else do I need to do, I can use the version here (call extendon my grid? ..)

Using 4.6.0 from https://cdnjs.com/libraries/jqgrid
Now use https://cdnjs.com/libraries/free-jqgrid 4.14.1

+1
source share
1

jqGrid "" , $("#grid").jqGrid("methodName", ...) $("#grid").methodName(...), . "" $.fn.jqGrid.methodName (, $.fn.jqGrid.editGridRow), , $.jgrid.no_legacy_api = true; $.jgrid.no_legacy_api = true;, $.fn.methodName.

, $.fn.jqGrid $.fn, "" jqGrid.

$.jgrid $.fn.jqGrid $.fn. info_dialog . , $.jgrid.info_dialog, $.jgrid.jqID, $.jgrid.htmlEncode, $.jgrid.randId .. this (, $.jgrid.randId() $.jgrid.jqID("some.text")), , this DOM ( <table>, ).

,

$grid.jqGrid("navButtonAdd", "#pager", {
    caption: "Test",
    onClickButton: function () {
        $.jgrid.info_dialog.call(this,
            "Warning with two buttons",
            "Click the `test` button",
            "Close",
            {
                buttons: [
                    {
                        text: "\"text\" button",
                        id: "buttid",
                        onClick: function() {
                            alert("click...");
                        }
                    }
                ]
            }
        );
    }
});

. https://jsfiddle.net/OlegKi/xLrbdspo/. jqGrid, , - 4.6 jqGrid, .

. TypeScript, free-jqgrid.d.ts , info_dialog, $.jgrid ( info_dialog). $.fmatter, $.jqm, $.jqDnR $.unformat, jqGrid , $.jgrid.

+1

All Articles