One page selection in DataTable PrimeVue - vue.js

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.

Related

bootstrap-vue table with sorting inside page

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?

Adding datatables from dynamic tabs into an arraylist

There are three tabs on the design of my page. In the third tab, there are dynamic tabs that are created. The number of tabs are based on the number of rows from the input file (which is in the first tab, for this case I will use two rows == two (dynamic) tabs in the third tab).
This means there are two tables, one table (let's call it Table A) in the first dynamic tab and another table (let's call it Table B) in the second dynamic tab.
I am trying to add Tables A and B into an arraylist.
Currently I have the code;
For each page in Tabs.Tabpages
Dim dataTableToCopy as New DataTable
dataTableToCopy = dynamicDataTable.copy
arraylistToHoldTables.add(dataTableToCopy)
The issue with this is that it only copies the last data table, in this case Table B.
I have tried another method, in which involved merging the datatables.
For each page in Tabs.Tabpages
Dim dataTableToCopy as New DataTable
dataTableToCopy = dynamicDataTable.copy
mergedDataTable.Merge(dataTableToCopy)
arraylistToHoldTables.add(dataTableToCopy)
The problem with this method is that, although I am able to retrieve all values, the main task was to add each table into the arraylist.
I was thinking of possibly splitting the merged datatable, but was unsure the method to take from there.
Split at row 100, since each table has 100 rows
The solution was to access each datatable from each tab was to iterate through the Controls of each tab
so in each tab, create a datagridview of the one in that tab and add that to the list.

How to interact between two tables on both directions in Excel?

I have 2 sheets in my Excel project:
In "Sheet1", I have a big data table, with 4 columns:
DataTable[Country], DataTable[Brand], DataTable[Parameter], DataTable[Calculated].
On "Sheet 2" I have a dashboard. I have there a table called FilteredTable that presents the data from DataTable. I have there a drop down command that lets the user select country, and the table is filtered accordingly.
I want that the FilteredTable will not only show data from the original DataTable, but to let the user to change the [Parameter] column. When changing it, I want that the [Calculated] column in both tables will be updated accordingly. If the user will change the country, then the FilteredTable will show the parameter that is stored in DataTable for that combination of [Country] and [Brand]. And if the user will get back to the first country, the displayed parameter will be the last one that the user entered.
I am a bit confused how to do it.
What I have done so far is:
1) to read into FilteredTable rows from DataFilter, using a formula array. I am mirroing this way [country],[brand] and [calculated]
2) in the DataTable[paramter], I read from FilteredTable[parameter] the same way, with a formula array.
It works fine, untill I change a country, and then the parameters in FilteredTable are already do not match the new country, and in DataTable, the parameters for the old country where changed to 0.
I'm in a logical loop. Is there a way out?
Thanks
Have you considered using 3 tables instead of 2? This would be: the original data table, a table which pulls in all values created through manual entry from the display table, and the display table itself.
In VBA, create a function which runs each time a formula is changed in the display table. That function should take the new data from the user, and copy the altered row onto the 'manual entry' table. For the display table itself, you could either recalculate manually through VBA every time a change is made, or have a formula which looks to see whether there is data in the manual table. If there is data in the manual table, that is where the value is pulled from. Otherwise, data is pulled from the original data table.

Populate combo box with distinct values from one table based on values existing in another?

I am trying to populate a combo box with distinct values pulled from a clients table, but only if those clients exist in the mfgOrders table. I have set the Row Source to the following query:
SELECT DISTINCT Client.ClientName FROM Client
INNER JOIN mfgOrders ON Client.id=mfgOrders.client;
When I switch to Datasheet view, I can see all the distinct clients that are also in the mfgOrders table. The problem is that this does not populate in the combo box.
I originally thought that this may be due to the data size, but oddly enough when I select ClientName from Client, it will populate the box successfully but with ALL clients.
Unfortunately, I don't want all clients in the combo box. Just the clients which also appear in the mfgOrders table.
I'm stumped on this one. Is my logic incorrect?
It appears that when linking a drop-down list to a query, the list will be populated based on how many fields are queried.
In this case, despite the first field being used simply to create the union, Access created a combo box with 2 columns, the first of which had a width of 0".
This appears to have been done because the "show" box for the first field in the query was unchecked. The result was a blank list.
To fix the error I simply re-arranged the query.

GridControl doesn't display the data it contains

I am using DevExpress GridControl to display information from my database through a stored procedure (ie. SELECT * FROM aTable). Unfortunately when I run the program it doesn't display any of the information, columns, etc. It displays an empty table.
I know that there is information contained by the GridView though as I have print statements that return the row count. Specifically:
Console.WriteLine(GridView2.RowCount) ' returns the number of rows that should be displayed
Console.WriteLine(myTable.Rows.Count) ' returns the number of rows that should be displayed
What should I do so that the actual data within the table (DataTable) and the DataView is displayed to the user. I know the row count is correct as when I add/remove a record the row count correlates by incrementing/decrementing.
In addition I have this same problem in C# and in Visual Basic
Ok I have the solution and it is rather easy. Go into the design view and from there go into the designer for the GridView. In there go to Columns, under Main, and add each column that you want displayed from your select statement. For each put the name that the select statement had for each column under 'FieldName' and under 'Caption' you can rename the columns to what you prefer.