getRows below the model length - sapui5

I have a table with a visible row count of 10 (this is fix). And the table has a binding with a total of 62 in length. When calling .getRows(), I only get the 10 rows visible but I need to get also the other rows (rows 11 onwards). I need to update the specific row/cell with CSS. How can I get the object in that cell, which is a button, and update its CSS?
Or is there any way that I can only apply the CSS with the specific row? For example, row 1 col 1 only and when I scroll the table, it will be removed or the CSS will not apply with the other?
Sample image

Related

Copy paste is not triggering cell renderer for all the rows

I have implemented ag-grid in angular application.
ag-grid version: 21.0.0
angular version: 6
I am having a grid, which has 108 columns and 200 rows.
Around 50 of those columns are having separate cell renderers.
I am copying certain column values from a cell and pasting them into a column for all the rows.
On processCellFromClipboard event, I expected all the rows refresh method will be triggered. But it didn't happen.
But the cell renderer is refreshed only for the rows which are visible in the DOM at that particular time. Only for 20 rows cell renderer is getting triggered. For others it is not getting triggered.
Is there any option to refresh/re-render for all the rows which are not visible by that time?
agGrid has a rowBuffer attribute that handles the number of rows that the grid can actually interact with at a time.
If you are using pagination you can easily set it to the current page size, otherwise set it to the number you want or the one that you display at a time.
[If that didn't help please post more code and ping me]

Tableau cuts off fields in table

In Tableau, I have a table with 8 Dimensions in the Rows Shelf. I also have a Calculated Field Dimension called "Blank" which only contains whitespace (" ") as a placeholder. However, as shown in the image below, this table is only displaying Fields 3-8 despite Fields 1-8 being included in the Rows Shelf. How can I fix this? I have edited the photo to redact sensitive information, yet included field names so it conveys the necessary information.
For the sake of others that may stumble upon this question.
The reason the columns are not shown is due a Tableau setting that is defaulting the maximum number of visible "row labels" to 6. This setting can be changed easily.
Problem - Column labels hidden and labels concatenated:
Solution - Update the table layout settings:
At the top, click on Analysis > Table Layout > Advanced
Increase Maximum levels of row labels and Maximum levels of horizontal row labels to at least the number of dimensions in the Rows section.
Result - All column labels displayed:

How to fix the number of rows while designing pdf using iText in java

I am creating one pdf file showing a list of all employees and their salaries. At the end of the page it is showing the total of all salaries.
I am using a for loop to add multiple rows to table.
The problem is:
at the end the row, the total salary doesn't fit on the same page and it is shown on the next page.
So is there any way that I can calculate the height of the page and then fix the height of each cell? And then accordingly, limit the number of rows.
So that at the end of the page, I can show the total number of rows and further record from next page.
Calculate the height of the page: well... you decide on the size of the page when you create a Document object. You can choose any size you want.
Calculate the height of a PdfPTable: that's explained in chapter 4 of my book. When you create a PdfPTable, you add PdfPCell objects to an object that only exists in memory and that doesn't know anything about page size. By default, the width is expressed as a percentage of the available width of the page to which you'll add the PdfPTable. Only when you add the PdfPTable to a specific Document, the exact width and the height will be calculated (which is too late for you).
If you want to know the height in advance, you need to define an absolute width (not a percentage). Tables with the same content and a different width will have a different height. Defining an absolute width is done like this:
table.setTotalWidth(width);
table.setLockedWidth(true);
In this snippet (taken from the TableHeight example), width equals the width of the page minus the left and right margin. You're defining the width of the page and the margins upon creation of the Document object. By default, the page size is A4, so the default width is 595 user units and the default margins are 36 user units.
So, one way to solve your problem, would be to add rows in a loop and calculate the height of each row with the getRowHeight() method or the height of the complete table with the getTotalHeight() method (both methods will return 0 if you omit setting the total height). If you see there's not enough space to add the summary row, you can use the deleteLastRow() method to remove that last row and to create it anew in a new table on the next page.
That's one solution. Another solution could be to use table and cell events, but that's more difficult to explain.

How do i edit my uitable property?

I have a figure of uitable. I have 4 row and 3 columns.When i go to the property inspector, i cant delete row number 4. How can i delete row number 4?
In the help to UITABLE PROPERTIES, it says:
The number of columns in the table is the larger of ColumnName and the
number of columns in the Data property
matrix or cell array.
The same applies to rows.
If you use the default row and column names ('numbered'), the easiest way to get your table to be the right size is to define an defaultData in the command window that has the correct number of rows/columns (in your case, defaultData = zeros(3,3), and set data property to that value.

How to make a table view which can be scrolled for ever?

I have a set of 100 rows, pretty similar to values which can be selected in a picker. When the user scrolls the table, I want the rows to be appended like an forever-ongoing assembly-belt. So when the user scrolls down and reaches the row 100, and scrolls even further, the table view will show again row 1, and so on. Reverse direction same thing.
My thoughts:
don't display scroll indicators (they would make not much sense, probably)
what value to return in the numberOfRows delegate method? This infinity constant?
in cellForRowAtIndexPath: simply wrap the index around when it exceeds bounds?
Many apps do this. The idea is that the beginning of the table is always the same, but you keep adding to the end, so the table just keeps growing.
Let's say you first have 100 data elements. Your numberOfRows returns 101 then. First 100 cells are normal. And scroll indicators still make sense.
If the 101st cell is displayed, you display a progress indicator like UIActivityIndicator in the cell, and initiate the process to load next 100 rows. When the data arrives, you either reload the whole table with UITableView reloadData, or you insert new cells individually with UITableView insertRowsAtIndexPaths:withRowAnimation:.
So, you just keep infinitely appending to the table. This is easier than trying to keep the table as a "window" that is always at N cells/rows and unload from the beginning of the table. If you need this sort of window, you may reconsider if this is really the best way to interact with your data.
I just finished implementing a variation of this.
Lets assume you have a 100 rows and 8 of them fit in a screen. Start by adding the last 8 rows first, then the 100 rows normally and then the first 8 rows at the end. Recenter the tableview by using setContentOffset to the first row of the 100.
When the user scrolls below the 100th one he will see rows 1-8, you can detect this in the viewDidScroll delegate function and recenter the scroll back to the first record (ensure u set the animated flag to NO when you do this). Similarly when the user scrolls past 1, he/she will see the last 8 records, you can again recenter the scroll view to show the last 8 records in the 100 row section.
This actually implements circular scrolling and the user can keep scrolling in both directions.
I haven't tried this but here's an idea. Let's say N = 100, since you have 100 rows. What we'll do is tell the tableview we have 200 rows, but we'll keep the user scrolling in the range 50-150.
Tell (the tableview) that you have double that number of rows, so for numberOfRows, return 2*N. In cellForRowAtIndexPath, always return the cell corresponding to (row % N).
Now init the table scrolled to row N (instead of 0) so that the user can scroll in either direction.
As the user scrolls up the tableview will eventually ask for row N+(N/2), when that happens send a scrollToRowAtIndexPath:atScrollPositionanimated: to scroll to the row-N. That will reposition the table back by N (ie: from 150 to 50), same cell but we'll never run off the end of the table this way.
Do the same when the tableview asks for cell at row N-(N/2) for scrolling up.
You'll have to deal with the special case where N cells fits in the view with extra room, ie: what if N were 1?