0

I am trying to use http://www.jquery-bootgrid.com/examples#data-api

When table is loaded from SQL database, all columns show up as all check boxes are marked in drop down menu (image attached), I want that only selected columns show up by defult and user can mark the the realted column field in check box to make it visible.

.Image here

<table id="employee_grid" class="table table-condensed table-hover table-striped" width="70%" cellspacing="0" data-toggle="bootgrid">
            <thead>
                <tr>
                    <th data-column-id="id" data-type="numeric" data-identifier="true">id</th>
                    <th data-column-id="own_referrer">O_Refferer</th>
                    <th data-column-id="own_aact_status">own_aact_status</th>
                    <th data-column-id="rate">rate</th>
                    <th data-column-id="text_Details">text_Details</th>
                    <th data-column-id="remarks">remarks</th>

                    <th data-column-id="commands" data-formatter="commands" data-sortable="false">Commands</th>
                </tr>
            </thead>
</table>

Lubna
  • 31
  • 2
  • 1
    I am using this code http://www.jquery-bootgrid.com/examples#data-api Please press "start the example button on this" grid will be visible – Lubna Sep 25 '19 at 05:49
  • write your code here in your question so it will be more clear. and I take back the vote. I just wrote this to help you being more clear. – Mohammad Reza Shahrestani Sep 25 '19 at 05:53

1 Answers1

2

found the solution. Just add ( data-visible="false" ) (without brackets) to the respective th line in table.

<table id="employee_grid" class="table table-condensed table-hover table-striped" width="70%" cellspacing="0" data-toggle="bootgrid">
    <thead>
        <tr> 
           <th data-column-id="own_referrer" data-visible="false">O_Refferer</th> 
           <th data-column-id="own_referrer">O_Refferer</th>
           <th data-column-id="own_aact_status">own_aact_status</th>
           <th data-column-id="rate">rate</th>
           <th data-column-id="text_Details">text_Details</th>
           <th data-column-id="remarks">remarks</th>
           <th data-column-id="commands" data-formatter="commands" data-sortable="false">Commands</th>
        </tr>
    </thead>
</table>
Lubna
  • 31
  • 2