ngx datatable vertical scroll bar does not come back to start of page if there there are more records than defined page size - ngx-datatable

Pre condition -
Have pagination, searchTerm, and vertical scrolling implemented and works fine.
records to show per page = 25
Steps to reproduce
User has searched for say 'batMan0' in the list of 100 files. Let's say names are from batMan001.txt to batMan099.txt.
User then scrolls to say page 2 by grabbing scrollbar and pulling it down. Now total number of files on the table is = 50 ( batMan001.txt to batMan050.txt)
Now user refines the search term to 'batMa', (so that search result increases). Once the search is finished, pageNumber resets to 0. This is OK.
The Problem -
Problem is with scroll bar. It does not come back to first row of the table and stays at the same place where user has left on table last time. And because of this, the rows are not visible and user has to scroll up to see the table rows.
How can I fix this issue i.e. bring back the scroll bar to first position.
Any help would be highly appreciated.

Related

How can we get the sum of the current page rows/data and how do we know new page is being added in multipage widget?

How to find sum of all the rows in a particular page. I am using Multipage widget and my data (rows) span across multiple pages. So i want to achieve the below.
End of the every page i want to show, sum of number of rows printed in this particular page.
I show the data by grouping the category. for ex, if i take the classic example of invoice page that was given in dart-pdf package in the below screen shot, it shows 10 detail record rows in this page. so in the footer record for this page, i want to show total number of row = 10 and total $ amt = 955.82. This is one problem i am facing. Footer callback function is being called after all detail records are painted and hence i assume i can't use this callback. but i can try store the detail records count in some global variable and can use this in footer call back but the problem is how do i know this is last row is being written in this page. I am unable to find out any call back to say new page is added or end of page etc. if i know this is end of the page then i can count how many rows written so far. similarly if we have any callback explaining new page is being added when data span across multiple pages that would be nice to achieve.
Another use case is, assume that your invoice page (above screen shot) is given for one category (in other words group by category) and if this category span across to next page then in next page first row, i should say this "same category invoice records are continued in this page". In order to show this, i need to know whether new page is being painted or not. is there a way to achieve this?
my widget tree is pdf.addpage -> multipage -> Table -> tablerow -> other widgets.
Appreciate the response. Thanks!

Exporting the SSRS Report in pdf format is having blank page issues

In SSRS Report 2016, I have 2 tablixes. The 2nd tablix contains only 4 columns.
When I preview the report, It comes perfectly in one page but when I export the report in PDF format or click on the Print Layout button in the report, the whole 2nd table/tablix moves to the next page.
In my case, the sum (Body Width + Left margin + Right margin) is less than the resulting page width. I set keep_together property to false but the 2nd table keeps rendering on the new page. If the 2nd table has less content then it displays below the first table on the same page and if the content is a little bit large then the whole table shifted to the next page and if the content is too big then it starts displays on the 1st page below the first table on the same page and continues on next pages with the remaining content. All the thing is happening when I am exporting report in PDF format, not on report preview.
Any solution for this?
Do you have dynamic col grouping or hidden textboxes ? in this case you need to make sure that when all the col visible on the reports it must have sum of width and margins less than the reports width.
Cross check the report width from properties window sometimes it contains white spaces because of which this happens.
Check whether you have added a page break after the tablix. If you did, and if there is nothing else to show after the tablix, then it will display blank on the next page.
Another possible reason that may bring blank page is that there exists large white space between tablix and page footer.
Please try these points once. Hope it resolve your issue.

Resize DraggableFlatList when rows are hidden?

I'm using the excellent package react-native-draggable-flatlist.
It has an isActive property that becomes true when a drag starts. I'm using it to set css display: none on some rows when the category is LongPressed.
The goal is to make drag/drop by top level category easier. However, the rows are still taking up space.
I'm hoping to (in this example) get Sleep and Energy to be right on top of each other before the drag starts.
Is there something simple I'm missing to get the list to resize when the rows are hidden?

Loading items in Combobox

I am working on a project and the problem that I have is; the items of my combobox are being loaded from the database table(one field); the table has more than 1000 records:
how can I load these records(one field) as items by giving a limit of 50 while allowing the user who wants to see all of the records through the combobox to see them but still by a group of 50?
which event can be the best for loading items to the combobox? textchanged, click....
I was thinking to use the vertical scroll bar so that when the user is at the end of the displayed items the next 50 will be loaded and if he is on the first and scrolls up the previous 50 will be loaded:problems with this way of thinking are:
when the user typed some caracter from the word that he wanna select
from the items' list if it is not loaded yet from the DB he will be
obliged to type the whole word
I don't know which event is raised
when scroll bar of reaches the end or is at the beginning
Is there any other way to do that?

Data Grid View VB.net 2013 , How many rows and which are visible in window?

I have a datagridview control with 10 rows on my form window.
Now lets suppose the size of the datagridview in the form can only display 5 rows to user and user has to use vertical scroll bar to see the other 5 rows.
now my question is :
Is there any way to know which 5 rows are currently visible to the user according to the position of scroll bar.
Actually in my program currently i am updating the all the rows value one by one of that datagridview table continuously.
Now i want to only update the rows that are visible in the window. so how can i know what rows are visible according to scroll bar position.
Thanks in advance
The DataGridView control exposes a VerticalScrollingOffset property which can be used to determine how far the view is scrolled. If you know the height of each row in the DataGridView in pixels, you can then calculate which rows of the table are currently visible and refresh them.
The height of each row can be determined through the DataGridViewRow property Height. This defaults to the font height, plus 9 pixels - if you're using the same font size in all rows this should be consistent.
EDIT: Further digging through the documentation shows that each DataGridViewRow exposes a Displayed property that returns true when the row is visible on the user's screen. Checking that would be much easier!
MSDN on DataGridViewRow.Displayed property