Adminlte Datatable - Select Row / Select Row

Asked

Viewed 82 times

1

I have a project in progress and I use the Adminlte for layout. I liked it a lot, but I have a doubt about Datatable: How to apply functions to select a line in Datatable?

I’ve tried applying several tips like:

$('#example2 tbody').on( 'click', 'tr', function () 
{
    if ( $(this).hasClass('selected') ) {
        $(this).removeClass('selected');
    }
    else {
        table.$('tr.selected').removeClass('selected');
        $(this).addClass('selected');
    }
});

But nothing works out.

Someone can?

Thanks in advance

  • Your error may be in html as well.. Post the code for ease

  • Opa Anderson! Thank you so much for the interaction. I tried to send the HTML code but it was not possible, here. There is another method?

  • Just edit your question and paste it, then select and click to organize as code, has a key design { }

  • Not allowed! Specifies character limit! But I think it’s not HTML, because when I change link that points to CSS and JS, which comes in the folders of ADMINLTE, for those I found on the site Datatables.Net, run. It’s as if the Board doesn’t have support

  • It has yes, I’ve used it enough times, tell me what you want? Change the color from the selection?

  • What beautiful news! What I want to do, and mark the line with a color, when the user clicks on it in Datatable. This to be able to catch the line that is marked and edit it later (CRUD)

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.