For displaying my tabled data I am currently using the angular datatables Here's the link. I am mostly satisfied with it up to some things.
The only problem with the angular datatables is, that I cannot manually delete a row from the table. There is some angular way for editing and deleting rows, but then the table get rerendered, so all sorting and paginations get lost. I found another solution (smart tables), but I didn't find if there is a possibility to edit/delete a row entry (from the table). Here is a little comparison.
I use angular-datatables for the following purposes:
Displaying some data with pagination and/or scrollbars
Defining own header width for every column
Searching over all columns / searching over some columns
Rendering some columns with custom html code (for example I put some action buttons in it, or make the entries in some cols to links)
Sorting values on every column (ascending, descending)
Disabling sorting on some columns
Multiselect on rows (highlighting a row and save the id of the dataset behind the row for actions)
NO editing/deleting rows
My question is, if you can do the same with smart-table
I figured out, that already all points are implemented well.
pagination: yes / scrollbars: no?
yes
yes
yes
yes
(yes?)
multiselect: yes, accessing selected data id no?
no?
I am only not sure about the 1st, 6th, 7th and 8th point. Can you give there a statement?
I could switch to smart tables, if there are all listed options available in it.
Thanks
Pagination? yes, you have pagination out of the box, you can even change the default template and functionality
Sorting? you can ENABLE sorting by adding an optional st-sort directive to the column header
Multiselect? no, but it's easy to implement over smart-table (done it once)
Deletion? you can delete rows (that is, doing DELETE over http and slicing the array if successful)
and if there is any additional functionality you'll need in the future that ST doesn't already have, you can create your own plugin for it. the docs are you friend
Related
I have an app that is essentially a table view with many rows and columns of select inputs and each select input can have 1000s of options. Each column in the table view is the same set of data per select input and each row is a different document in the database. When using regular selects with this many options inside, we get crazy lag. So I looked around and decided to use a combo of two packages.
Demo example: https://codesandbox.io/s/react-windowed-select-inside-react-window-dh24r?file=/index.js
My plan was to combine react-window with react-windowed-select, but this too has pretty bad performance issues. The lag is especially noticeable on initial render. (notice the load time when clicking on the React Select Rows button).
What is the best way to handle this sort of application in React? I'm currently thinking there may be 2 options though I'm sure there are many others.
Find a way to improve performance using the existing two
packages.
Write something far more custom that loads all of the
rows with plain text and a single react-windowed-select component
per column that is hidden. When the user clicks on what would be a
select input, we position that columns select input as if it was in
the clicked location and open it.
Any help or advice is appreciated.
I have a Google Sheets dataset and I'm creating a Google Data Studio report out of it (and I'm a beginner).
I need to create 3 filters, similar to this I did on Google Sheets:
First and second are alright, just adding the filter and selecting the metric.
However the third one should select the metric to be analyzed in my chart, so it gets to look like this:
And the metrics to be analyzed are the ones in yellow in my sheets database:
If I understood correctly I need to leave dimension as customizable variable to the user among a set of variables.
Is there a way to do that?
I didn't find a proper way to do that in Google Data Studio.
The best way I found was to add an Optional Metric chart by chart. It is not ideal because I wanted a single metric filter for all charts.
The other way to do it would be to unpivot your original data. Add a new color name indicator that will have the column names. And then have all the values in a single field. So your rows will increase by 3x amount and you will have 2 less columns. Then you can add the indicator field as a filter.
I have a Java servlet which queries a DB and shows table in the browser. I have implemented pagination so that when the user scroll the table the new request are made only then. The problem is if the user chooses to sort the table in UI based on some column, the request takes a long time because actual table in DB is quite big and it sorts the entire table and then send the sorted paged data to the client/browser. So suppose if the table has 100k rows and I have a page size of 100 rows, so is there a way to tweak the sorting in DB or in pagination in servlet that the sorting the entire 100k rows is not required.
Pagination may help. So, here is how it usually done. Unlike, the old paginated page by page loading web pages, when you have single page scroll. You usually have a drop down which lists the sorting column.
You first load the first page, as soon as the page's bottom appear, you request next-page's query via AJAX. Until here, I guess you are fine.
What seems to be troubling you that if the user has scrolled, 10 pages deep and then he sorts, you will have to load 10 pages of data in one go. This is wrong.
Two things,
When you change sorting criteria, you changed the context which you were viewing the table in.
Assume, if you load 10 pages and keep the user at 10th page. He will be surprised what happened.
So, as soon as user changed the sort criteria, you clean the DIV and load page 1, by new criteria. You see you do not have burden now. Do you?
Couple of quick-tips:
I personally think it's better to leave DBMS to do the sorting and pagination. I think it's made to do that. You should write optimized queries.
Indexing columns to be sorted-by helps some.
If items do not change frequently, you may want to cache the pages (results from DB) with an appropriate TTL.
Leverage DBMS provided special functions to optimize the query. Here is an article for MySQL
I have a requirement, where the user has the ability to select multiple cells (row wise or column Wise). As soon as the selection is complete I need to merge only the selected cells(not the entire row or column). I did some research online, many suggested grouping. But when I use grouping entire row is getting merged.
Can you guys please help me with this issue.
DataGrids are not spreadsheets, you should probably look for another control as doing this in a DataGrid may be near impossible.
Okay. two questions on interactive sorting:
1. How to sort on multiple columns without holding SHIFT key?(like this: http://lukehayler.com/2011/04/sorting-on-multiple-columns-in-ssrs/)
2. How do I cancel sorting? So, usually on most web, first click on sorting arrows icon sorts by ascending, second click sorts by descending, third click cancels sorting. With SSRS I only observe first two options. Is there a way to cancel column sorting?
1) Right now that is just how the report viewer works, as others have said you could write your own controll to view the reports but this may not be an option due to time or skill level constraints.
Other people have written their own custom report viewer controls however I have always stuck to the MS version so I havent got much experience with these, and I would suspect any good ones would be a paid solution.
2) I would love this option myself, again you cant reset the sorting in this way as SSRS does not keep a record of the initial 'unordered' state of the data.
The only options you really have here are to reload your data with its original parameters or as nathan pointed out include a column that contains the starting sort order, however users may not like this as it is adding data which is not really relevant to the report data.
1) There is no way to do this with the standard report viewer control
2) There is no way to "cancel" sorting. However assuming the data was sorted into some order originally then you could include a column on the report that represents the original sort order (if it's complex ordering then you could represent this with a sequence number). This would allow the user to sort on that column to return to the original order of the report.