The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I would like to have a height of vertical scrolling bar of GridDataBoundGrid to make the page number when the GridDataBoundGrid has lot of rows.
The draft code is:
pageNumber = heightOfGridDataBoundGrid/ heightOfVerticalScrollingBar
When the height of GridDataBoundGrid is changed then the page number is also changed
Thanks for your support!
Len
ADAdministrator Syncfusion Team May 10, 2005 10:47 AM UTC
I am not sure this will allow you to do what you want.
The height of all scrollable rows in the grid is:
int heightAllRows = grid.Model.RowHeights.GetTotal(grid.Model.Rows.HeaderCount + 1, grid.Model.RowCount);
The height of the scrollable client area is
int heightOfScrollableClientArea = grid.ClientSize.Height - grid.Model.RowHeights.GetTotal(0, grid.Model.Rows.HeaderCount);
But unless you are assuming all rows have equal heights, and that the grid is always sized so only an integral number of rows are vivible, I am not sure how your calcualtion will work.
Some other calcualtions and properties you may want to consider using:
grid.TopRowIndex - gets or sets the top scroallable row in the grid
grid.ViewLayout.LastVisibleRowIndex - last visible row in the grid (may or may not be partially visible - check grid.ViewLayout.HasPartialVisibleRows to see)
LTLen TranMay 11, 2005 09:18 AM UTC
Thank you!
Another questions:
1) I would like to display the number of each page on label when croll is changed the position. How can I do that with the formula above?.
Example: page 1 of 15, .... page 2 of 15 etc
2) What is the event of GridDataBoudGrid when I adjust the height of GridDataBoudGrid by mouse(at the bottom of GridDataBoundGrid)
Thanks for your help!