隐藏添加按钮Jquery Datatable Editable

时间:2014-08-11 16:40:49

标签: jquery jquery-datatables

我正在尝试隐藏Jquery Datatables中的ADD按钮,如下所示,但它不起作用。 任何帮助都将受到高度赞赏。

  AddNewRowButtonOptions: { label: "Add...",
                        icons: {primary:'ui-icon-plus'},
                        display: none

        }

我尝试了以下选项,但它仍然无效

  {'#example').dataTable().makeEditable({

            oAddNewRowButtonOptions: "destroy",
            oDeleteRowButtonOptions: {  label: "Remove", 
                            icons: {primary:'ui-icon-trash'}
            },

            oAddNewRowFormOptions: {    
                title: 'title',
                resizable: false,
                modal: true,    
                minWidth: 500,
                minHeight: 450,
                closeOnEscape: false,
                close: function( event, ui ) {
                        resetSuccessOrErrorMessages();
                    }

            },
            sAddDeleteToolbarSelector: ".addDeleteToolbar"

        }          

1 个答案:

答案 0 :(得分:0)

它会将其转换为jquery-ui的按钮,尝试使用:

$('#example').dataTable().makeEditable({
    oAddNewRowButtonOptions: "destroy"
});