not able to set column width on column that contain html (form and select)
not able to set column width on column that contain html (form and select)
jonescw
Posts: 14Questions: 4Answers: 0
Datatable set the width of the column to fit all the html code. I have tried setting the column width using the width option.
code:
<div id="editMBR" style="display: none;">
<span class="buttonPop b-close"><span>X</span></span>
</div>
<div id="DT">
<table id="MBRList" class="display compact" cellspacing="0" >
</table>
</div>
</div>
<div id="formfooter" >
<img style="vertical-align:middle" src="../images/LoginLogo.png">
var tableMBRList = $('#MBRList').DataTable( {
"scrollY": "620px",
"scrollX": "100%",
"scrollXinner": "200%",
"sorting": [[1, "asc"]],
"paging": false,
"ScrollCollapse": true,
"responsive": true,
"dom": 'i<"toolbar">frt<"bottom"lp><"clear">',
"ajax": "../mysql/researchSQL.php?SQLNum="+sqlNumber+"&t="+sqlType,
"autoWidth": false,
"columns": [
{"data": "EDITOR", "orderable": false, "searchable": false, "title": "Action", "width": "100px", type: "html" },
{"data": "MEMBER_ID", "title": "ID", "width": "100px"},
{"data": "LOGIN_ID", "title": "Login ID", "width": "100px"},
{"data": "FIRST_NAME", "title": "First Name", "width": "100px"},
{"data": "LAST_NAME", "title": "Last Name", "width": "100px"},
{"data": "COMPANY", "title": "Company", "width": "100px"},
{"data": "EMAIL", "title": "E-mail", "width": "100px"},
{"data": "ROLE_NAME", "title": "Role", "width": "100px"},
{"data": "TYPE_NAME", "title": "Type", "width": "100px"},
{"data": "CREATED_ON", "title": "Date Created", "width": "100px"},
{"data": "SHORT_NAME", "title": "short Name", "width": "100px"},
{"data": "DEFAULT_IP", "title": "Default IP", "width": "100px"}
]
});
data in column 0
form action=""><select name="cars"><option value="a">Volvo</option><option value="b">Saab</option><option value="c">Fiat</option><option value="d">Audi</option></select></form>
This discussion has been closed.