datatable column resize plugin
datatable column resize plugin
Hi there,
Since we are using datatables at work and we just needed a resizable column functionality, I've implemented a plugin called 'colResize'. I hope it's good enough to be useful for somebody else as well.
Main features
- Resize columns by mouse drag or touch
- Resizable can be set for each column
- Plugin is able to consider min-width / max-width values of columns
- Can be enabled / disabled / reset programmatically
Live example:
http://live.datatables.net/hafazixi/3
Repository:
https://github.com/dhobi/datatables.colResize
Daniel
This question has an accepted answers - jump to answer
Answers
Hi Daniel,
That's superb! Thank you for sharing that with us. I've added a link to it on the DataTables home page (in the "What's new" section) so others will hopefully see it an benefit from it as well.
Regards,
Allan
Hi @dhobi, We have check your script but when we add a scrollbar in the grid, it stops working. it only allow to resize the header only. This is what we have done in javascript:
$(document).ready( function () {
var table = $('#example').DataTable({ "scrollX": true});
Do you have any suggestion on that?
@mmahmood2020 You will want to contact the author of the plugin directly for help. Use the
Issues
option of the plugin's repository:https://github.com/dhobi/datatables.colResize
Likely its not supported as
scrollX
clones the header to allow for scrolling. The table rows are a separate table and the plugin probably doesn't take this into account. But you will need to check with the developer.Kevin
Hi @dhobi we are facing resizeColumn issue after recent chrome91 update can you please tell us what could be the possible reason, currently we are unable to resize the columns only the header is resizing but columns remains till the width limit
It was working fine untill the chrome 91 update
ColReorderWithResize.js file seems to be having issues after chrome 91 update can i get latest nightly build recent file ? or any support for the reported issue
Have you tried contacting the author through the github repo? The author might not login into this forum often to see these posts. This plugin is not created nor supported by Datatables.
Kevin
Hi @dhobi, I'd like to know if this plugin supports RTL (right-to-left languages like Arabic, Hebrew etc). Thanks in advance.
You will need to contact the developer of the plugin. Use the Git Repo for this:
https://github.com/dhobi/datatables.colResize
However I'm not sure if the plugin cares about the direction of the language.
Kevin
@kthorngren Thanks for your reply