ZohebSiddiqui
ZohebSiddiqui

Reputation: 211

display dropdown list in jquery datatable

i am using Jquery Datatable , they are really amazing but now my requirement is that for one column i have to show that dropdown list which will have 2 options 1)Approve 2) Reject. now my requirement is that how to display dropdownlist in jquery Datatable.

Upvotes: 0

Views: 2301

Answers (1)

coolguy
coolguy

Reputation: 7954

<table id="tabid">
                    <thead>
                      <tr>
                        <th>Column 1</th>
                        <th>Column 2</th>

                      </tr>
                    </thead>
                    <tbody>
<tr>
<td>
   sample data
</td>
<td>
<select id="something">
<option value="1">Approve</option>
<option value="2">Reject</option>
</select>
</td>
</tr>
</tbody>
</table>

<script type="text/javascript">
$(document).ready(function(){
$('#tabid').dataTable();
});
</script>

Upvotes: 1

Related Questions