I would like my table to have row grouping, but also want to be able to edit it.
This table will be updated each month as a top selling report.
What is the best table construction to achieve this?
My data starts with a CSV or Excel file. I tried using linked to existing data source, but that allows row grouping but not editing. Importing data from a data source doesn't allow row grouping. Suggestion?
Unfortunately, what you're looking for to achieve cannot be done. Only non-server-side tables can have row groping (tables linked to an existing data source).
Editable tables (tables with server-side processing enabled) can't have row grouping.
A workaround for this could be SQL query based tables.
You can import the CSV file, and it will create a manual table which will be saved in the database. When you enable editing for that table, you will see its database name.
Then you can create a new table linked to an existing data source (SQL), which you can create with this query:
SELECT * FROM wp_wpdatatable_#
Where # would be the table's ID (seen in the editing tab).
SQL table has a slider which allows you to disable server-side-processing. So, that new table can be used to display grouped rows on front-end, while the original manual table can be edited. All changes made in the manual table will be seen in the SQL query based table.
I would like my table to have row grouping, but also want to be able to edit it.
This table will be updated each month as a top selling report.
What is the best table construction to achieve this?
My data starts with a CSV or Excel file. I tried using linked to existing data source, but that allows row grouping but not editing. Importing data from a data source doesn't allow row grouping. Suggestion?
Hello again Adriana
Unfortunately, what you're looking for to achieve cannot be done. Only non-server-side tables can have row groping (tables linked to an existing data source).
Editable tables (tables with server-side processing enabled) can't have row grouping.
A workaround for this could be SQL query based tables.
You can import the CSV file, and it will create a manual table which will be saved in the database. When you enable editing for that table, you will see its database name.
Then you can create a new table linked to an existing data source (SQL), which you can create with this query:
SELECT * FROM wp_wpdatatable_#
Where # would be the table's ID (seen in the editing tab).
SQL table has a slider which allows you to disable server-side-processing. So, that new table can be used to display grouped rows on front-end, while the original manual table can be edited. All changes made in the manual table will be seen in the SQL query based table.
I hope that helps.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables