Start a new topic

Controlling the rows returned in the Data Grid

[This topic is migrated from our old forums. The original author name has been removed]

For obvious performance reasons, DbVis fetches a limited number of records into the data grid. What I'm trying to figure if I can fetch the last "n" records in the database. I know I can filter based on a specific criteria (e.g. account_data_ref >= 10000), but that's not really flexible (as I'd have to find the current maximum value each time and then update my filter). A filter of something like "account_data_ref >= MAX(account_data_ref) - 1000" is what I'd need (where 1000 needs to match the max rows I'm asking DbVis to display in the grid). However, I'm not sure this is possible... Actually, what would really suit me is that when I refreshed a grid, the grids sort order was used as a basis for fetching the records from the database. So that if I've sorted by "account_data_ref desc", then when I refresh the grid, DbVis is issues a command like "SELECT * FROM account_data ORDER BY account_data_ref desc LIMIT 1000" in order to get the data to display in the gird. Is what I'm asking for already supported or is there any workarounds that would help me... Edited by: Scott Robertson on May 20, 2016 5:21 AM

[This reply is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Re: Controlling the rows returned in the Data Grid
I've just released that by right clicking on the grid and selecting the "Generate Filter and Sort" --> "Generate sorting filter for Column Sorting" option, it will give me what I need... When a filter is applied this way it shows up as per the attached screen shot. So I guess the only thing that would be really nice ofr my particular use case is for the default filter to be "ORDER BY DESC" for all tables...

Scott,


If you sort the column visually by clicking column header two times, the sort order when Generate Filter and Sort-> Generate sorting filter for Column Sorting. Then when the filter has been applied it will remain between sessions and even in the list of last used filters in the funnel icon drop-down. This way you can set individual filters for each of your tables and have them preserved.


Despite the above I assume you are looking something more automatic?


Regards


Roger

Roger,


Thanks for the reply. I've been doing that (using Generate Filter and Sort-> Generate sorting filter for Column Sorting) and that actually works quite well. 


Some form of automatic default "ORDER BY <primary_key> DESC" might be nice, but it's not really a priority for me now. I'm happy enough for this thread to be closed off...

Login or Signup to post a comment