Fixed column and filter width

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Fixed column and filter width

=> the template engine you're using :Thymeleaf
=> the version of Dandelion-Datatables: 1.1.0
=> the app server: Tomcat + Spring 4
=> the web browser you're using (Chrome, Firefox, IE, ...): IE11 & Firefox 44.0.02

* more specific things such as:
=> the kind of data source: AJAX + server-side processing + Spring 4 + JPA (EclipseLink)


I want to disable the automatic column width calculation of my table and set the width of columns manually.
From the documentation page I found that I can add a property (dt:autoWidth="false") to my table and disable this feature. However, it is not working for me.

<table id="userListTableId" dt:table="true" dt:url="@{/userList}"
	dt:serverside="true" dt:filter="true" dt:filterPlaceholder="header"
	dt:export="pdf,csv,xls,xml" class="CTdataTable" dt:autoWidth="false">
			<th dt:property="userId" dt:renderFunction="actions"
				dt:sortable="false" dt:filterable="false"
			<th th:text="#{username}" dt:property="username" dt:filterable="true"></th>
			<th th:text="#{firstname}" dt:property="firstname" dt:filterable="true"></th>
			<th th:text="#{lastname}" dt:property="lastname" dt:filterable="true"></th>
			<th th:text="#{password}" dt:property="password" dt:filterable="true"></th>
			<th th:text="#{pin}" dt:property="pin" dt:filterable="true"></th>	
			<th th:text="#{email}" dt:property="email" dt:filterable="true"></th>
			<th th:text="#{phone}" dt:property="phone" dt:filterable="true"></th>
			<th th:text="#{rfidLabel}" dt:property="rfidLabel" dt:filterable="true"></th>
			<th th:text="#{personalNr}" dt:property="personalNr" dt:filterable="true"></th>
			<th th:text="#{identificationNr}" dt:property="identificationNr" dt:filterable="true"></th>
			<th th:text="#{active}" dt:property="active" dt:filterable="true"
				dt:filterType="select" dt:filterValues="activesDropdown"

I appreciate if anyone can help me :)