morlandi / django-ajax-datatable

A Django app which provides the integration of a Django project with the jQuery Javascript library DataTables.net
MIT License
215 stars 65 forks source link

Remove left +/- column #99

Closed michaeldacanay closed 1 year ago

michaeldacanay commented 1 year ago

Is it possible to remove the +/- on the left column beside each row in the tab? Currently, when pressed, the page seems to refresh back at the top instead of staying in-place. This behavior doesn't show up when clicking on the row itself; the data expands fine.

cnagytcorp commented 1 year ago

in your column_defs what is the first column ? {'name': 'edit', 'title': 'Edit', 'placeholder': True, 'searchable': False, 'orderable': False, } remove it

michaeldacanay commented 1 year ago

My first column was {'name': 'id', 'visible': False, 'orderable': True, }. The +/- remain when I remove it.

cnagytcorp commented 1 year ago

check the [Add row tools as first column] https://github.com/morlandi/django-ajax-datatable#add-row-tools-as-first-column

remove AjaxDatatableView.render_row_tools_column_def() or post a section of your code, im not expert would help you if i can

michaeldacanay commented 1 year ago

Ohh, thank you! I didn't notice that AjaxDatatableView.render_row_tools_column_def() was the first item in the list.