javascriptjquery-bootgrid

disabled 'hide' function in bootgrid


Im new to bootgrid and jquery or ajax. I found a good plugin for doing table(bootgrid), but I still cannot understand few code inside.
Now I want to edit few thing in the droopdown at the top and right hand side, the drop down will show the th value,and when you click the value, the whole row of that value will be hide.
I just want to make one value of them become disabled.I dunwant user to hide the "Commands",because it row show the button. The code was take form here: Bootgrid

I want to make the "commands" to disabled


Solution

  • It's very simple. Let's suppose you have this HTML representing your bootgrid:

    <table id="grid-basic" class="table table-hover table-striped">
        <thead>
            <tr>
                <th data-column-id="ticket-id" data-type="numeric" data-identifier="true">TICKET ID</th>
                <th data-column-id="submission-date">SUBMISSION DATE</th>
                <th data-column-id="status">STATUS</th>
                <th data-column-id="ownership">OWNERSHIP</th>
                <th data-column-id="applicant-name">APPLICANT NAME</th>
                <th data-column-id="applicant-ic">APPLICANT IC</th>
                <th data-column-id="order-type">ORDER TYPE</th>
                <th data-column-id="package">PACKAGE</th>
                <th data-column-id="commands" data-formatter="commands">Commands</th>
            </tr>
        </thead>
        <tbody>
          <!-- data via javascript -->
        </tbody>
    </table>
    

    You just need to add data-visible-in-selection="false" to the column you don't want to be visible in that dropdown menu:

    <th data-column-id="commands" data-visible-in-selection="false" data-formatter="commands">Commands</th>