How do I manually set the total row count for the pagination for the Material-UI Data Grid? - html-table

I am overriding the onClick for the previous/next for the pagination for my DataGrid table with onPageChange and onPageSizeChange. This is because I am doing an api call each next/prev page click to get the next/prev page data. Thus I have to manually set the total page count (ex: 1-5 of 150, I'd want to set manually the 150).
rowCount requires me to turn off pagination so I cannot use this.

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!

Does DetailsList expose a callback to add more items to the list(pagination)

I have a scenario where there are total of 150 items that we want to render, but server returns set of items - say 30 at a time.
We want to use DetailsList, however, we did not find any prop that can be used to update (add to) the list of items when user scrolls to the bottom of present list.
I see that DetailsList handles UI virtualization, however it seems we need to pass the entire set of items at the beginning only.

PageNumber / TotalPages on group header in report .rdlc

I have a .rdlc report where I have no header (I have group headers)
I want to put the PageNumber on the group header.
If I use Globals!PageNumber I get this error:
The Value expression for the textrun 'Textbox12.Paragraphs[0].TextRuns[3]' refers to the global variable PageNumber or TotalPages. These global variables can be used only in the page header and page footer
Is there any way I could do this?
If there is no possibility to put this data on a group header...is there any possibility of overlap a header with the group header on a same line?
Global variables can't be used outside of the header/footer, as there is no relationship between the header/footer and body areas. Therefore, there is no easy and precise way to display the page number in the body area.
However, as suggested by user Raymond-Lee in the second link, you can try to calculate it yourself by dividing a given row number by the total number of rows per page (and adding one if the page number will always be the first row). Nonetheless, this would take a bit of effort.
First you need to have the Page Header/Footer showing, then you can add items to it. To show it, right click in the pale yellow area of the Layout view. Then select Page Header and/or Page Footer, this will create another section on your report where you can add items. Or, you can go to the Report menu option and enable the Page Header/Footer from there.
link

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?

Hide Row from dev gridview vb.net

I want to remove/hide this row (in orange) from the grid, I don't know what this row mean.
Thanks.
I see that the auto filter row feature is enabled on you screenshot. This feature row allows data to be filtered on the fly - by typing text within a row.
To disable this feature set the GridOptionsView.ShowAutoFilterRow property to false.
You can also restrict this option from activating by end-user via hiding the "Show Auto Filter Row" check item within the Column Header Context Menu. To do this, just set the GridOptionsMenu.ShowAutoFilterRowItem property to false.