bootstrap-vue table with sorting inside page - vue.js

I have a bootstrap-vue table with pagination.
When I sort data by clicking a column header, data is sorted globally, which means that page N of a sort-by-column-one table displays different data than page N of a sort-by-column-2 table.
I would like to have an additional internal per-page sorting, e.g. via two separate column header rows. The first one would be responsible for global sorting, the other one would only (re-)sort displayed data of the current page.
Is there a standard way to do this?

Related

One page selection in DataTable PrimeVue

I use DataTable with a paginator. I have a Column with multiple selection mode. I want this column to select only one page rows instead of all table data. Is it possible in PrimeVue?
I have over 10k rows in a table and this number will always change, therefore I can't use a lazy datatable. I need to select all rows but it's not possible with such a large amount of data, instead I need to select just one page view, just like in Gmail when selecting the e-mails.

sm30: Set matching column heading

I created a table in SAP via se11, then I used the table maintenance generator.
Now I edit the table via sm30:
The second and the third column: Both have the heading "Feldname".
The first "Feldname" column is called COLUMN_NAME and its data element is "Fieldname".
The second "Feldname" column is called AUTH_FIELD and its data element is "XUFIELD"
I would like to see the column names which I gave the columns in se16 (COLUMN_NAME, AUTH_FIELD) in the heading.
How to prevent the table maintenance generator from giving other names in the headings?
Option 1 - use custom data elements:
Instead of using Fieldname and XUFIELD data elements, you can create your custom data elements and give them what header you would like.
(You will have to regenerate table maintenance)
Option 2 - editing screen
When generated the table maintenance, you supplied a function group and a screen number.
Go to SE80 -> Function Groups -> <function_group_supplied> -> screens -> <screen_supplied>.
Then edit it as you want.
Note: Modifying a generated object is considered risky. Your customized changes might be overwritten in a future regeneration.
Add custom data elements with suitable descriptions. Let the new data elements refer to the original ones (resp. the domains) to avoid having to reinvent everything.
Data element descriptions can be translated.
You can set different descriptions for different lengths, e.g. "Field" for the narrow column with length 10, and "Field name" for a wide label with length 30.
Regenerating the maintenance screen won't accidentally delete the changed descriptions.

How to make a MS Acess Report where you have one page per record?

I cannot figure this out for the life of me.
I want a report object where each page (no matter how big, small, etc) corresponds to one record in the underlying source query (each record corresponds to a Client along with some financial data).
I've tried grouping by Client, inserting page breaks, trying to integrate forms, etc. Nothing. Everything just combines together into one giant list -- there's no separation per page.
Select the Group Header and view Properties (F4). It should be named something like GroupHeader0. For the Force New Page attribute, select Before Section, After Section, or Before & After Section.
The hardest part of this for me was finding the correct item to click that has the Force New Page attribute -- it isn't the field itself, but the Section (which is named "GroupHeaderX" by default).

Create DataTable child row without showing it?

I am using datatable (v1.10.2 with jquery 1.9.2) because I like the out-of-the-box features (searching/sorting etc). However, now I want the ability to:
1) use animations (sliding) when showing/hiding a row
2) have the hidden row available in the DOM to change (ie, it would exist but have a display:none).
My current code to create the table looks like the following (where formatChild() returns html for a table):
if (row.child.isShown()){
row.child.hide();
tr.removeClass('shown');
} else {
row = row.child(formatChild());
row.show();
tr.addClass('shown');
}
I am using several services to change data in the child row's table via ajax and want to be able to change that data even when the row is hidden. I know I can create a map in memory and use the information in the stored map when I show the child row, but to me it is much cleaner to change the hidden row immediately.
I was hoping I could do a row()child(), modify the row, then call row()child().show() but the row isn't created in the DOM after the row.child().
Regarding the animation, I found an answer here but it involves changing the datatables code :(
I considered just using jquery to add a row to the datatable and hide it, but I couldn't find a good way to "attach" it to the primary row for sorting.
The plan I am currently leaning towards is to add a div to my primary table row that I will show/hide/update rather than using child rows at all.
What is the best practice for managing these hidden areas in a datatable (and showing them with animation)? ty
In case anyone else has the same question, I ended up using a DIV in the row rather than using DataTables' child row. When I add a new row to the datatable, the div is hidden then I hide and show (slideup/slidedown) on a click event. This gives me the nice animations, keeps the sorting simple, and let's me change information in the hidden row. Interestingly, the DIV contains a table and the text that is in that table when I create the new row is searchable; however, the text in the table that my ajax call adds/modifies is not searchable. I'm looking into how I want that to work (and may keep the div out of the search altogether if possible).

Struts 1 - How to pick up a table row values to process in another JSP page

I'm facing this trouble: I have a <table> filled (<logic:iterate>) with some data coming from an Action, the last value (of each table row) is a link that would drives me to another JSP page with the data of the row where the link was clicked to edit the corresponding values.
The fact is that I don't have any idea how to grab the values from that row and pass they to the other JSP page once the link is clicked.
Any ideas / example / implementation?!?!
The code that creates the link (in your table rendering JSP) can embed the ID of the object for that row in the link as query parameter such as ?objectId=13AB73C. (For security reasons it's even better to embed a unique hash of the ID rather than an actual database id). That id can then be obtained from the request parameters.
Once you have the id of the object for the row, you can load the data from the database for your editing page.