1

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

Qiu Xue
  • 163
  • 12
  • Please explain by what you mean by disabling one value. Plus, I feel that you mean that the action hide the entire column and not row. – Tanvi Chaturvedi May 15 '17 at 09:26
  • I just dun want user can click the checkbox of `Commands`, if any idea please help me.Thank in advance – Qiu Xue May 16 '17 at 02:32

1 Answers1

3

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>
Alisson Reinaldo Silva
  • 10,009
  • 5
  • 65
  • 83
  • thankyou! I thought this question will never have answer.Really appreciate of you answer! – Qiu Xue May 26 '17 at 05:43
  • Even the code still not working.But I think maybe is my problem, I will find out the solution – Qiu Xue May 26 '17 at 05:46
  • @QiuXue you're welcome. I'm going to prepare a JSFiddle so you can see this solution working, and you can also play around with it – Alisson Reinaldo Silva May 26 '17 at 11:17
  • 1
    I found out the problem already,that is because different version of plug in that I use.My plugin is direct get from here http://phpflow.com/php/addedit-delete-record-using-bootgrid-php-mysql/ .Yesterday I get an example from another website,and you code really work on that example.So my problem is only using wrong plugin.But I still need some time to do it.because I cant just replace the plugin,if I do that,my current bootgrid will going wrong – Qiu Xue May 27 '17 at 03:33
  • And very sorry about my broken english.Hope you can understand what I mean. – Qiu Xue May 27 '17 at 03:35
  • @QiuXue no problem, I could understand ;) – Alisson Reinaldo Silva May 27 '17 at 18:39