jqueryajaxdatatablesjquery-easyui

Insert EasyUi linkbutton in Datatables


I use Jquery Datatables (https://www.datatables.net) in my site and I whant insert in a cell a Linkbutton from ui "EasyUi" (http://www.jeasyui.com) loaded via Ajax, but browser show it like plain link and not with a Button link.

This is code that php with Ajax insert in the cell

<a href='#' class='easyui-linkbutton'>Test</a>

If I use some code out the table it's work fine


Solution

  • You'll need to set up your buttons in the drawCallback like this:

    $(document).ready(function(){
        $('#example').DataTable({
            "drawCallback": function( settings ) {
                $(".easyui-linkbutton").linkbutton();
            }
        });
    });
    

    Working JSFiddle here. Your JSFiddle didn't work because you were mixing http with https and so some of your external resources weren't being loaded. Hope that helps.