You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By using the DataTables Html Plugin, we can easily declare our columns in getColumns() method, but if we need to apply custom filters or edit, we must do it in the dataTable() method.
When we have a lot of columns, it can be a bit confusing and not easy to manage.
We need to declare columns in 1 place and filter/edit then in another place.
I would like to suggest to implement new methods on the Column class to automatically register edit and filter in the datatable.
The result will look like this:
I love the idea since this is what I am also doing now with the export functionalities via exportFormat and exportRender.
And I think we should also consider the orderColumn callback?
For edit on the other hand, I tend to use render, renderRaw, and delegate it to js/client side when possible. I think it's better to make the server-side response as small as possible for better performance.
I agree with your idea of adding these functionalities to the Column definition.
Yes, I forgot the orderColumn but yes, it should be included too.
I also try to use render, renderRaw when possible, but in some cases it can be more convenient to use editColumn.
That's why I would like to support it too.
Hi,
By using the DataTables Html Plugin, we can easily declare our columns in
getColumns()
method, but if we need to apply custom filters or edit, we must do it in thedataTable()
method.When we have a lot of columns, it can be a bit confusing and not easy to manage.
We need to declare columns in 1 place and filter/edit then in another place.
I would like to suggest to implement new methods on the
Column
class to automatically registeredit
andfilter
in the datatable.The result will look like this:
What do you think?
The text was updated successfully, but these errors were encountered: