Sorting table rows of the current page with quasar - sorting

I have a paginated q-table in quasar, and I'm trying to sort it's columns. However, it sorts
the whole table. Is there any way to make it sort only the current page?

Related

Sorting Issue After Table Render in Laravel DataTables as a Service Implementation

I have implemented laravel dataTable as a service.
The initial two columns are actual id and names so, I am able to sort it asc/desc after the table renders.
But the next few columns renders after performing few calculations, i.e. these values are not fetched directly from any column rather it is processed.
I am unable to sort these columns where calculations were performed, and I get this error. And I know it is looking for that particular column for eg outstanding_amount which I don't have in the DB, rather it is a calculated amount from two or more columns that are in some other tables.
Any Suggestions on how to overcome this issue?
It looks like you're trying to sort by values that aren't columns, but calculated values.
So the main issue here is to give Eloquent/MySql the data it needs to provide the sorting.
// You might need to do some joins first
->addSelect(DB::raw('your_calc as outstanding_amount'))
->orderBy('outstanding_amount') // asc can be omitted as this is the default
// Anternative: you don't need the value sorted by
// Don't forget any joins you might need
->orderByRaw('your_calc_for_outstanding_amount ASC')
For SQL functions it'll work as follow
->addSelect(DB::raw('COUNT(products.id) as product_count'));
->orderByRaw(DB::raw('COUNT(products.id)'),'DESC');

Dynamically hide rows in an NSTableView

Is it possible to dynamically hide rows in a table view without reloading everything? I have a (view based) table view with it's content member bound to an array controller (arrangedObjects) which itself gets its content from Core Data.
To enrich the UI I show group rows for sections with the same date (all entries in this set have a date in this case). But for certain tasks I need to hide these group rows (e.g. when sorting for something else but the date). In order to show them I already have to create a copy of the original data set and manually insert entries that serve as placeholders for the group rows (which is annyoing as it duplicates data), but I don't want to re-construct this constantly depending on whether the group rows must be shown or not. Is there a better way for this?
Hiding any row requires to rearrange the table view content anyway.
Create all rows including group rows and filter the group rows if needed by applying an appropriate filter predicate.

Auto sorting Spreadsheet

I am new to spreadsheets. I am using it as my backend. I want the new responses to b in the first row, i.e. the whole table should be sorted in the descending order of timestamp. In column 1 I have a time stamp. I have columns till J. So how to sort the table automatically so that whenever the new responses come the table is auto sorted. I did check this.
But I don't understand how to apply data formula to my spreadsheet.
I think either of these should work for you:
=SORT('Datakk (Responce11)'!A2:J,1,0)
=QUERY('Datakk (Responce11)'!A2:J,"order by A desc")

Sorting in kendogrid not on the data in current pagination, but the complete data fetched from database

In kendo-grid there is option to sort the column data by clicking on column header, but sort is applied on only the current page data.
Suppose I fetched 100 records from database, and choose to keep pagination of 10 records at a time on GUI,so that at a time we can see 10 records on the webpage.
Now, my requirement is to apply sort not on only 10 records, rather all fetched record.
Any suggestion is welcome.
Server sorting is the only way to go. Please check this:
http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-serverSorting

Telerik Rad Grid Sorting

I have a rad grid which fetches the data from database and displays required number of records even though there are number of records
eg: if there are 10,000 records which comes under search criteria. But we are retriving only the records equals to page size. ie., if paze size is 10 then 10 records will be retrived even though there are 10,000.
This is done to overcome performance issues while loading millions of records.
Now the problem is if user clicks on grid column to sort only 10 records are getting sorted. But i need all the records in a sorted order then required records get displayed in the page.
Two possibilities pop up in my mind:
If you use LINQ or Entity Framework, the telerik grid will perform the paging on the database server and only the items on the current page will be loaded. See demo here.
Use manual custom paging or binding to ObjectDataSource as in this sample.

Resources