#Row order in table is wrong
1 messages · Page 1 of 1 (latest)
Hello! I'm AppsmithBot, here to assist you with your Appsmith queries.
When you connect a query to a table widget in Appsmith, the table might not display the data in the order returned by the query due to default sorting settings on the table. To ensure the table displays data in the order returned by your query, you can follow these steps:
-
Disable Default Sorting: Make sure that the table widget does not have any default sorting applied. You can do this by checking the "Default Sort Order" property in the table widget settings and ensuring it is set to "None".
-
Set Column Sorting to None: For each column in the table, ensure that the sorting is set to "None" unless you specifically want to allow users to sort by that column.
-
Check Query Binding: Ensure that the query is correctly bound to the table's data property. It should look something like this: ** {?{ QueryName.data }?} **.
If you've checked these settings and the issue persists, please let me know!
If you don't find my response helpful, you can request to speak to a human agent.
There is no default sort order
To ensure that the data in your table widget is displayed in the correct order as returned by your query, you can try the following steps:
-
Disable Column Sorting: Ensure that column sorting is disabled in the table widget settings. This can be done by going to the table widget's property pane and disabling the "Column sorting" option?8:16?source?.
-
Check Query Binding: Make sure that the query is correctly bound to the table's data property using the mustache syntax, like this: ** {?{ YourQueryName.data }?} **. This ensures that the data is directly fetched from the query without any additional sorting or manipulation?8:17?source?.
-
Server-Side Pagination: If you are using server-side pagination, ensure that the query includes the correct order by clause. For example:
SELECT * FROM your_table
ORDER BY your_column
LIMIT {?{ Table1.pageSize }?}
OFFSET {?{ Table1.pageOffset }?}
This ensures that the data is fetched in the correct order from the server?8:15?source?.
- Auto-Generated Queries: If you are using auto-generated queries, verify that the order by clause in the query matches your desired order?8:15?source?.
By following these steps, you should be able to display the data in the correct order in your table widget. If the issue persists, please let me know!
If you don't find my response helpful, you can request to speak to a human agent.