Datatables column width resize. Fixed column width on Datatables.
Datatables column width resize js that is causing this. 3. e "I want this column to be relatively larger". DataTables Columns Widths Do Not Resize. Until hiding the column, I never saw this behaviour. 10. Setting an min-width to each . Having a strange issue when using the bootstrap v3. resize-step: global: The width to resize the column when a user presses left or right arrow It was something like 1947 pixels or so. I fixed it by just setting the delay to 0 and causing the form to submit immediately, allowing jquery to hide the other input before new width values are set. columnFilter({ sPlaceHolder: "head: Feature control DataTables' smart column width handling. I would like to achieve: if screen width < 700px , then only show the 1st and last column. Based on the ajax response I get from the server I want to hide/show a column and adjust the other columns width accordingly (they are all fixed size). For example In 1920x1366 the tables fits the page perfectly, but o and the columns resizing is much less ugly :-) But, I still don't understand why there is still some changes in the column's width (a few pixels only) when the table is redrawn (after paging for instance), whereas there remain lots of space in each columns. Once I hide enough columns and the table is smaller than container I can resize them. jeditable. There is a lot that can inflict on each column width, and even if you carefully target each column with an exact percentage that add up to 100 you end up frustrated. invalidate() can cause columns to resize, and for the DataTable to use a column's explicitly set width, init autoWidth needs to be set to true and the table element should have its width attribute set. Call it when the table becomes visible if hidden when initialised (for example in a tab) or when the data changes significantly. Hi, I had to add an additional column to my table and now it stretches well beyond 100% of my window. Specify whether min-width / max-width styles are checked to keep resizing of column in bounds Column width in tables depends upon many properties such as cell borders, table borders, the border-collapse property, the content of the table and many other properties. render-config: global: Reserved for internal use. UPDATE 2 MUI Datatable column resize using @material-ui/core, @material-ui/icons, mui-datatables, react, react-dom, react-scripts MUI Datatable column resize Edit the code to make changes and see it instantly in the preview Jan 24, 2021 · I'm using "ngx-datatable" inside my Angular10 app. May 23, 2015 · Auto resizing of columns width datatable. 0. adjust() and it doesn't work! This example shows the first column being set to width: 200px (note that this is not pixel perfect in a table, the browser will make some adjustments!), a width that is reflected in the fixed column. Pokud jste ještě Like I said I'm not familiar with Flexbox but it sounds like flex-md-row is a responsive class. Apparently the DataTables sets column widths to fixed amounts once it figures out the contenth width. adjust(); i got "Uncaught TypeError: h[0] is undefined". It's like the script is adding a little width to everything to account for scrollbars that are not there. Jul 27, 2018 · Auto resizing of columns width datatable. Answers xtech_dev Posts: 25 Questions: 11 Answers: 0 Oct 1, 2014 · I am however trying to use Fixed Columns and no paging with a scroll window. By default, datatable columns are 100px wide and their width cannot be changed via the UI. even the older column reordering and resizing didn't seem to be as neat. As in snapshot, Column : Description 's text is wrapped so its width keeps changing as I sort. Is there any way to achieve that via API? How do I set the column width to auto resize to a certain width? what is the attribute to do that in the DataTable? For example, I want all of my columns at a width Automatic resizing when the table's container changes width (uses ResizeObserver). column(idx Hi @BobZAnnapolis,. How to auto-resize width of DataTable after hide column/add filter? pansengtat Posts: 66 Questions: 26 Answers: 1. To resolve this I will attempt to replace hidden data by using the data-* attribute. Is there an accepted method to get the column headers to resize themselves so that they are the same width as the table columns? Sep 29, 2016 · th. As in snapshot, only 7 Columns are visible on full page. Jun 1, 2012 · The columns that are fixed in place by FixedColumns take their width from the parent DataTable. By default, the parameter is disabled. During loading no issues, all the columns are fit to the size. Since we are using datatables at work and we just needed a resizable column functionality, I've implemented a plugin called 'colResize'. dataTable() . 1 and Bootstrap v3. Tried autowidth. Having played around with the JSBin system I have found that any scrollX or scrollYbeing present in the options will cause the system to begin resizing data columns to fit the width of the screen/table rather than use a fixed column width. One thing you could try that may help is to add columns. I'm trying to understand why on initial load it's respecting my code: Oct 17, 2017 · My experience is that columns. Open a page containing a table with initially hidden columns. 1 CSS on my datatable. So thanks for the excellent software. I've also tried the answers found to this stackoverflow question to no avail. Mar 3, 2009 · Check this solution too. Column sizing event - fired when the column widths are recalculated. I tried putting width 100% but didn't work. Both DataTables and the browsers attempt to lay the table out in an optimal manner taking this options all into account. Main features - Resize columns by mouse drag or touch - Resizable can be set for each column This method is provided to have DataTables recalculate the columns sizes, based on the data in the table and the size applied to the columns (in the DOM, CSS or through the columns. How to interactively resize a fixed column in DataTables's FixedColumns plugin. Incorrect column widths”. As soon as i enabled the bootstrap css it really screws up the column widths (see attachment2). If you ever need to set your datatable column's width using CSS ONLY, following css will help you :-) HTML Lets say I am on one page with datatable and resizing the column. It is very neat. If I remove the sScrollX property the table will then display using the defined column widths. My column header remain's same only the data is getting updated ( old records + new records ) . Basically the field grows because the column width is altered by the not-yet-hidden input box in the same column. However when I have only a couple rows (not enough to force scrollbars) every time I click a column to sort, the table width and column I sorted increase slightly in width. You will find posts on this forum with issues regarding its use but all issues need to go to the developer of the library. What I am pursuing is to adjust the cutoff depending on the size of the column. Steps I followed: Scoll down until you see the fixed header on the table, and now if you vertically resize the window, you will observe some of the columns got hidden as dropdown of (+) - the usual responsive behavior when we resize the window horizantally. If you want to get involved, click one of these buttons! The columns displayed by Responsive has changed due to a resize. Or others I will have to scroll down. adjust() when the tab becomes visible to fix the column widths. This option can be given in the following type(s): boolean min-column-width: global: The minimum width for all columns. In the static example, it is for example the second row (Dobrý den,dnes mám pro vás 2 úkoly:1. When it does this, the minWidth property it calculates for each column ends up being different than the CSS enforced min-width actually on the table. This event is fired whenever DataTables adjusts the column widths in the table and can be used by plug-ins to adjust any additional DOM elements they might have drawn on the page to take account of those changes. JQuery DataTables 1. But there is no option to set column width in mui datatable column options. . width DT option. 5 panel on a bootstrap Model. In the default configuration (CSS table-layout: auto + DataTables' autoWidth: true) the columns are appropriately sized based on the data and do not jump when filtering. After a page is refreshed, the size returns to the initial one (provided that you haven't saved the state of the table). The resizing does work fine for subsequent Ajax loads but, on the first load, the columns do not resize nor does the table expand horizontally to take up the available space. I am not sure how to fix this issue. Does 1 mean always show? EDIT: Is there a way to show/hide columns based on exact width? Basically I'd like to hide 3 particular columns when it's smaller or equal to 800 pixels wide and show those 3 columns when it's larger than 800. Jan 1, 2011 · Hi, I found an easy way to reproduce this bug: 1. i am also having a very similiar problem: my table is 6 columns but the autowidth seems to not be disabling ie. Columns can be resized in two ways, with a helper or live. resize-column-disabled: global: If present, column resizing is disabled. Nov 14, 2012 · Auto resizing of columns width datatable. What am I doing wrong? Can somenone suggest another way to resize the select as the same width as the column?: Dec 12, 2019 · I am trying to set different column width for every column. But approach/code I'm using to set columns widths back to default values just not working. A third party developer created a plugin called colResize which you can try. So when you resize the window, it leaves it to that set width When I have enabled FixedHeader with {"left":true}, the column headers don't change width when the table is resized. I looked at the Column priority documentation but it's unclear to me what the priority numbers mean. My init code for datatable is the following, I include it within a function so that once I have dynamically resized my html page to the right proportion depending upon screen size I can initiate the datatable. adjust(); }, 500); in your click handler to trigger it at the end of the animation. Some alternatives might be: Hi everyone, I'm having a problem with my data table when it's resized! i have a left div and when i hover over it, it expands, resizing the table and other elements, the datatable width resizes when the div opens, but when it closes, it doesn't resize and it looks like this in the image, already I tried table. Type. Now the column just shows 'Inst', now the user is double clicking the column to auto resize. datatable-column-width element; Attaching a column-sizing. adjust() into initComplete, that should resize the widths more sensibly. dataTable( {"sScrollY": getSideWindowTableHeight() + "px", "bScrollInfinite Howdy, Stranger! It looks like you're new here. 7. is it possible? my current code looks like this : <ngx-datatable *ngIf=" Jul 26, 2018 · You can add another empty header and set width of every column to min value(1%), except empty to make it fill all free space. If I manually resize the browser window it will auto resize the columns: I'm sure I'm missing something but can't figure out when. display: none) the browser will not calculate the width of columns (since the non-displayed element has no width!). My code: $('#myScrollTable'). There is a timeout in jquery. I tried to override css properties also and that is also not working. if I set all columns expect one or two to specific width and set datatable as response, and resize window, all columns with predefined width stay with their width and if there is no space for them they hide, but columns without width, change their width until 0 and whenever some other column hide they (column without width) show again. Double-click on resizer or press ALT+W to auto-adjust the column width to fit text like Excel. With the CSS disabled my datatable renders correctly and the column widths are not the best but reasonable (see attachment1). width. Possibly one of the only missing features is this ability to resize the column, but I especially like how this one will shrink smaller than the word size which I believe column reorder and resize would not do. Jul 1, 2021 · setTimeout( function { table. adjust(). My left pane is collapsible, but whenever I collapse my left pane the column width in datatables is not automatically resized based on new width but when I click on any of the column headers it expands / collapse based on the total width. Is this normal behaviour in ColReorderWithResize when I want to use a scrollbar? Note I am using: DataTables 1. How to increase column width size in datatables jquery. I want to save column width in database after resizing,but its not saving in cookies even using "bStateSave": true I am getting column width "oSettings. Also you need to add empty td to table body template to make grey row dividers visible. The app is using flex to layout the usual header, sidebar and data area panels. This event can be used to inform external libraries and controls that Responsive has changed the visibility of columns in the table in response to a resize or recalculation event. You can change the value for a particular column or for all the table in general. I have wrapped the ngx-datatable inside a div that has Apr 21, 2022 · ColumnResizeEvent is giving me the wrong width when resizing datatable columns primefaces. Feb 26, 2016 · Now, it is nice that we can see all data, but if we were to use the column resize functionality provided by the github code, it is of small use since the text shown stays the same even though there is more space available. There was an increadible amount of under-the-hood changes for the front-end, we've mostly moved away from pre-processors. This is an arbitrary, easy-to-remember value. However Datatables is unable to calculate these widths for hidden tables. I first initialize my datatable using ajax service request and I have one button which destroys the datatable initially created and recreate with same data. width mostly is suitable for relative intents, i. Enable or disable automatic column width calculation. Aug 1, 2010 · First of all - cheers for DataTables - it is fantastic! Anyway, I don't except for a minute this is a new forum topic but I am having real difficulties trying to get any column resizing plugin to work with DataTables - is anyone succesfully using a column resizing plugin with datatables 1. September 2014 edited September 2014 in DataTables I've just switched over to using DataTables, and I'm really loving its capabilities. Fixed column width on Datatables. When _columnsVisiblity() runs, it's calculations end up all being wrong, so the columns do not resize and hide based upon the actual min-width of the column. dt event which: (a) sets the width of each header to it's current width (this shouldn't be necessary, but seems to be required) and (b) updating the max-width for each . I can't find the setting where this value is fixed. columns. however, It is working fine cell width is getting updated and scrollX is also getting enable. This parameter can be used to define the width of a column, and may take any CSS value (3em, 20px etc). My small issue: in my table, the columns don't resize when the window size is changed, unless scrollX is set to true. If I use the thead and tfoot, then the sizing seems to not work My init code for datatable is the following, I include it within a function so that once I have dynamically resized my html page to the right proportion depending upon screen size I can initiate the datatable. { width: 80%; } DataTables events; Column rendering; Cursor is changed to e-resize only when you're actually resizing the column; if you want it to be changed to e-resize, change the following: [code]$('')[/code] to The difficulty in resizing columns by dragging the column headers arises if you are using the Scroller because DataTables creates two tables - one for the ScrollHeader and another for the ScrollBody After much trial and error, I tried using JQueryUI's resizable functionality and it works quite well. dataTable ({ "sScrollX": "200%", //This is Brilliant! Really nicely done :-) I guess the obvious issue is with the fact that the table is inherently constrained to the width of the container - so columns basically have a maximum size they can be and reduce the size of other columns. draw() after the table is visible with no luck. 0. If I remove all table layout html and just use the below, then the resizing works but I lose the column filtering. But it is not working at all. As such, the width of the column can be controlled using the columns. 0 updates brings a lot of changes, most notably a modern UI refresh. <script> $( Im encountered problem that table header width not adjusted with its column until its adjust itself after I resizing window. sWidth" i will store in database but i can't figure out how to load back the same column width again. I have a Datatable with to columns. To change the width of a column, use the width property available in GridColDef. DataTables needs to use pixel defined width columns to sync the columns in the header and body when using scrolling. The issue is that when a User resizes a column to be smaller than the containing content and then sort the table, the width on the column that has the specified width is overridden and sizes dynamically but the header remains at the specified width so everything becomes misaligned. width option. Source. @allan The link you shared is the perfect example of the issue I am facing. Update: Allan pointed out setting "sScrollXInner": "100%" was the culprit. The issue is hardly noticeable on high-res screens, but on low-res monitors the difference is so severe that content shifts by as much as 2 columns. Change individual column widths when using DataTables jQuery plugin. resize datatables to fit within R markdown. When I use table. It would seem that datatables lacks the ability to correctly calculate a resize with hidden elements. dataTables_scrollHeadInner div. However this plug-in was not compatible with the latest version of jQuery DataTables. Column width. js to allow the user to resize the column and I want to show more text depending on how wide the column is. dataTables_scrollHeadInner { width: 715px !important; } Jan 14, 2025 · My fix in DataTables is to set the height of the container to be fixed during the column width calculations, then use a setTimeout(,0) to remove the set height. Display DataTables columns at natural Sep 21, 2011 · Im having a problem with Datatable in C#. If you view the test case in a browser window at full screen size and then resize the browser window to be smaller, then the columns in the table are not resized to fit in the new table dimensions. Therefore, you cannot change this using simple css because the fixed width used by datatables had higher priority. Thank you! Aug 6, 2018 · I am using the following code to set the column width of a DataTable. So the intention is to, when a double click happens in the datatable column, it should auto resize. I want to manually set the size of the columns, how do I do this? this is the code: dt = new DataTable(); DataColumn Aug 4, 2015 · There are 8 column in total . 7 Hi I have recently starte using DataTables. $('#datatables'). The content for column 12 is under heading column 10, for example. 20 margin", "0"); //Resize the datatable to fix header widths Oct 30, 2013 · bAutoWidth is just a flag indicating whether dataTables should calculate the widths automatically. I have received dummy data from the API which I overrode with my dataSet. Hi All, I was wondering if there was a way to resize columns when the width of the table is greater than that of the containing element. The 3. In my case it is 715px, for example. Nov 14, 2017 · Past version of jQuery DataTables had column reordering plug-in ColReorderWithResize that also provided the ability to resize columns by clicking and dragging the point between two columns. I'm using colResize to adjust the width of the columns, but when I reduce the the width of one column, the width of the others columns change too. EDIT: I have one column that is hidden currently. However I need a Datatable within a Bootstrap 3. That will stop DataTables adding its calculated widths to the table, leaving your (presumably) width:100% alone and allowing it to resize. But when I open child rows (by clicking on the column with the text preview), the columns magically resize a bit. This only occurs in the test case when the first column is hidden. Description. The upshot of this is that you don't need to call columns. width parameter). Jul 9, 2018 · I am currently using ngx-datatable (with [columnMode]="'force'") I want to prevent users from resizing the column size. Calling the datatable constructor again trying to change the sWidth in aoColumns dynamically is forbidden. Is there a way to get the width of a specific column in pixels? I am using ColReorderWithResize. Fixed column width. The data loads fine but the columns do not resize. g. Click "Set Column Widths" button and I get no change. 2. Are there any options to automatically resize the table or column when the width of the window is changed? Ideally I'd like to see all columns (maybe reduced font size) with no X scroll bar in both tables, and the tables side by side. aoColumns[1]. 1. It works once using $('#examplethead th:eq(0)'). Please find the function function SetupRequestTable() I've found a problem with table resizing and hidden columns in 1. Mar 17, 2015 · Auto resizing of columns width datatable. I'm attempting to adjust the width of my columns but no matter what I do, the columns seem to adjust to fit the content inside them. 9. Click "Get Column Widths" button in my test example. Resize the browser window horizontally and you will be able to see that the fixed column retains its width while the scrolling viewport and the The null means that I want those columns to retain the datatables auto width they have set in their code. 16) and it was because I set autoWidth to false without understanding what it does. In case the user is shrinking the column manually. EDIT 2: I attempted the solution above but the issue persists. 2, and if they are, what are they using? The every() of said columns is being delegated to the function below, but width is always turning out to be undefined. width(120), but after resizing the table and calling fnAdjustColumnSizing the first column goes back to the base 80px. Here's an example: Datatables column resize with component select2. If you expand these rows to take up enough space to add a vertical scrollbar to the page, and scroll down, FixedHeader does not calculate the proper column widths and the column headers resize as a result. 1 DataTable Column Resize. It didn't work. Setting it to false is an optimisation feature, see the docs:. Please note - this property requires the Responsive extension for DataTables. If you want to get involved, click one of these buttons! which works fine on main body of the screen. By default, the columns have a width of 100px. Feb 9, 2021 · I have a datatable that doesn't respect the screen width when screen resize. Jun 12, 2017 · Auto resizing of columns width datatable. Display DataTables columns at natural Data Grid - Column dimensions. However there does not appear to be a way for me to set the width of the datatable, real-time, as a user resizes the browser window. fnAdjustColumnSizing();} ); [/code] This is needs in order to allow DataTables to recalculate the optimal column widths for the resized table. 4. That's not possible, I'm afraid - the table columns can't be user dragged/resized. e. When enabled, the method doesn't actually resize the datatable. I am using Jquery v3. Basically, trying to update width css via column class with jQuery then use table. width("100%"); since it changes the width attribute directly in the table element. 10. But now I want to change that option on the xhr event. this solved my DataTable column width issue easily . draw(). If you want to get involved, click one of these buttons! There is nothing built into Datatables to allow the user to resize the columns. To change the size of a particular column use: width while configuring the column to set width to a column individually; Dec 28, 2018 · Howdy, Stranger! It looks like you're new here. The columns that are fixed in place by FixedColumns take their width from the parent DataTable. In order to enable column resizing you’ll have to: add a storeColumnsKey: your_key property to the DataTable (since the order of the columns is persisted in the local storage); add a resizable: true property to each resizing candidate column; use the useDataTableColumns() hook to get the effective columns. ColReorderWithResize 1. $('#example'). < Jul 21, 2021 · This calculation takes a little time and may be disabled when the column widths are explicitly passed using the columns. Resize the browser window horizontally and you will be able to see that the fixed column retains its width while the scrolling viewport and the Apr 25, 2011 · Often you may want to have your table resize dynamically with the page. 62. This can be disabled as an optimisation (it takes a finite amount of time to calculate the widths) if the tables widths are passed in using columns. I'm having an issue with using FixedHeader extension in combination with pagination: when new pages are loaded, the column widths are re-evaluated and updated based on column content length. Now i am moving to another page and come back to previous page at that time I need to retain the column resize. 13. 1. [code] function setupTable() {var oTable = $("#datatable"). I am using a datatable with width specified for the columns. Please note that pixel perfect column width is virtually impossible to achieve in tables with dynamic content, so do not be surprised if the width of the column is off by a few pixels from what you assign using this property. It doesn't happen with all rows and at all sizes. Jun 1, 2012 · This example shows the first column being set to width: 200px (note that this is not pixel perfect in a table, the browser will make some adjustments!), a width that is reflected in the fixed column. But nothing happens. Nov 28, 2016 · What I would like is that if I resize header column (e. What silly thing am I doing wrong? Oct 27, 2017 · Auto resizing of columns width datatable. Column width assignment. adjust() any more if the table is made visible, having initially been hidden, or its container otherwise changes width due to some other resizing on the page. resize( function {oTable. It is the scrolling that causes this to be needed. Adding a relative width to the columns would also help stop the columns bouncing. Select2 appears to be applying a fixed width to the input element: If a table is initialised while it is hidden (i. So it seems a call to rows(). Isn't there a way to resize the column width inside my web app with drag and drop like in Excel, that would be very user friendly since the contents of my table vary quite a bit in length. They have a minimal size of 205px and they will not resize to fit if the required size is smaller than that. I tried creating a parent div with 100% width and didn't work either. The solution I found was using "width" jquery's method after hiding the columns: $("#reportTable"). datatable-column-width element to match it's heading width (using instance. [code] Jan 12, 2018 · Btw there is a tricky point here !!! Ngx-datatable set a fixed width for every column if you want to increase that width you should set a positive number that this number will add to the Ngx-datatable width i mean if you set 50 as width ,50 will add to Ngx-datatable fixed width : 50 + x ( Im not sure but i think it was 130 PX for every column) Apr 24, 2018 · I have a shiny app with two datatables side by side. This allows Datatables to properly calculate the column widths. Customize the dimensions and resizing behavior of your columns. Feb 15, 2016 · Hi Michael, I have tried your suggestion in my code regarding section “1. Notices that the order column should be change to last column as well. "autoWidth": false. The default is 50px. Removed that and columns resize correctly. Datatables force The way DataTables works is to have two tables - one for the header, one for the body (when scrolling - it's all one when not) with is in a scrollable div. Then add that width to css:. table. From what I can see, there are two elements that need explicit width setting - MY table (that holds the data) and the DT column headers table. 'autowidth': false, Tried table-layout:fixed but didnt worked. 7 and jQuery 1. Resize the browser window horizontally and you will be able to see that the fixed column retains its proportional width (again with a small margin @kthorngren I previously had had autoWidth set to false, and I was already calling columns. Nov 26, 2011 · What you can do to stop this behaviour in DataTables is set the autoWidth parameter to false. As such, Responsive's calculations for which columns to show at the various widths will be incorrect in this situation. Jun 10, 2021 · Auto resizing of columns width datatable. i've got the problem that my DataTable Columns only scale up. Thanks a lot. render-mode: global: Reserved for internal use. Browser column) then the body column should align with header column. dataTables_scrollBody thead th". Syntax: { autoWidth: value } Parameters: This option has a single value as mentioned above and described below: value: This is a boolean value that denotes whether the automatic calculation of column width is Jun 8, 2017 · I know we can set the columns width on a datatable via the columns. big-col{ width:400px !important; } table#example{ table-layout:fixed; } The !important for the width is necessary to override any inline styles being applied by datatables, and possibly other styles being applied by jsfiddle or whatever. How to adjust data table column width. I hope it's good enough to be useful for somebody else as well. It looks like when using columns. When scrolling is enabled you need to call the fnAdjustColumnSizing method: [code] $(window). On Column resizing in stop event I simply get the column cell Index and header width of that column and set the width in my respective column " . Is there any other option to set column width . It will match the column widths between the two on every draw - this is way it must set an absolute width on the columns, otherwise they will be out of alignment and look rubbish. Dec 7, 2022 · We have a DataTable with a lot of columns and the columns resize dynamically based on content. Here is the updated Codesandbox with the nightly build of DataTables. Aug 8, 2016 · I'm creating an app with jQuery Datatables, and I want the tables to look the same no matter what type of resolution the pc have. Can I change the width of search text fields in dataTables ? I am writing following code right now but it is not working. Thanks, Sam Javascript DataTables DataTable: Set colspan of column title dynamically; Javascript DataTables - set column width and wrap text; Javascript DataTables - set column width and wrap text (Demo 2) Javascript DataTables - Table header and columns width mismatching; Javascript DataTables whole column background color I have a datatable (I made a static copy publicly accessible). Any idea ? Thanks ! Center pane displays the data table and left pane is used for browsing. dataTable({"bAutoWidth": false, Regardless of how many columns I display or hide, the column widths stay fixed and do not resize to the widths I've defined in aoColumns. You can use columns. Make your browser window small. You can see the problem here: Jun 8, 2015 · I had this problem with the current version of DataTables (v1. During partial page load the width appears to be correct and when it loads completely, the width is off. it auto widths every column still and the width varies up when my data is inconsistent during paging Oct 14, 2014 · I have a primefaces datatable , i want that the column width be dynamic based on the content length , i made a function that calculate the content length (call()) but the problem is the content ret Jun 1, 2012 · This example shows the first column being set to width: 20% (note that this is not pixel perfect in a table, the browser will make some adjustments!), a width that is reflected in the fixed column. table{table-layout:fixed} Jul 28, 2016 · Auto resizing of columns width datatable. If you want to get involved, click one of these buttons! I currently have a bug, which means that when I open the app, the column is the size of the column on the first page, but when I resize the browser window, it redraws the table with an unnecessarily wide first column : narrow first column : unnecessarily wide first column : why the first column is wide (page 24) : When you simply apply DataTables to an existing table on a page, if it doesn't have to do any column manipulations, then it doesn't have to figure out for itself the column widths, and lets the browser do the work, making the columns expand or shrink in width to fill the available space. R Shiny set DataTable column width. Howdy, Stranger! It looks like you're new here. adjust() the flexbox responsive class takes affect and adjusts the container after the columns. Thanks! allan Posts: 63,871 Questions: 1 Answers: 10,525 Site admin Hi there, I found for a datatable with column width resizing enabled, you can resize a column to take the full width of the table and make all the rest of columns completely invisible. Currently I am stuck in one issue of column width re-sizing. Jun 21, 2013 · After I load the page and click on the header, so that it expands and shows normally, I inspect the table header and record the width of the . However the floating header column widths do not resize, and therefore a gap/shift exists between the headers and the columns. Jim3540 Posts: 15 Questions: 5 Answers: 0. tzjwwtjnbjtrvnftojtvltowvnzbfqucnpbwatcqkgglpjnolc