Responsive table where needs to hide/show rows with the same order ID

Responsive table where needs to hide/show rows with the same order ID

d0ng1ed0ng1e Posts: 4Questions: 0Answers: 0

Hi, i'm trying to create the resonsive table where i need to hide/show rows with the same order ID. Please, explain me how to hide rows instead of colums?

Replies

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Responsive hides columns, not rows, as it needs to make the table thinner.

    Colin

  • d0ng1ed0ng1e Posts: 4Questions: 0Answers: 0

    Many thanks for your reply! Maybe do you have some example?

  • rf1234rf1234 Posts: 2,990Questions: 87Answers: 421

    type "responsive examples" into the search field please and you'll have 10 examples right away.

  • d0ng1ed0ng1e Posts: 4Questions: 0Answers: 0

    Please, help me to understand what's wrong, i'm tried to fill the table and received an error "datatables warning table id=usertable - invalid json response", the page of the table is http://www.pivna-hata.shop/bulah.php

    My JS Code:

    $(document).ready(function() {
    $('#usetTable').DataTable( {
    processing: true,
    ajax: {
    url: '../get_order.php',
    dataSrc: ""
    },
    columns: [
    { data: "name" },
    { data: "salary" },
    { data: "office" },
    { data: "position" }
    ]
    });
    });

    JSON Response is:
    [{"name":"John","salary":"30","office":"New York","position":"System Architect"}]

  • rf1234rf1234 Posts: 2,990Questions: 87Answers: 421

    $('#usetTable')

    this probably cause the error: usetTable instead of userTable

    please use mark down to make your code legible!!

  • d0ng1ed0ng1e Posts: 4Questions: 0Answers: 0

    My table id is usetTable, so, that's not a problem :'(

    <

    table id="usetTable" class="display nowrap" >

  • rf1234rf1234 Posts: 2,990Questions: 87Answers: 421
    edited April 2020

    Then you need to follow this: https://datatables.net/manual/tech-notes/1

    or post a complete test case please.

This discussion has been closed.