TTIWAdvWebGrid - How do I?


Please excuse me in advance if the answers to these questions are easy but I just haven't been able to find them :-(

I've been learning a lot about the web grid over the last few days and impressed what we can do with it but now I'm turning my attention to how things look and this is where I am having some issues.

I like the fact that you can change the number of rows the web grid will show if required but what I really need to know is how to have the number of rows shown to always be the same irrespective of the number of total rows and/or the total number of pages and also how to have the page controller always showing.

For example lets say I have a web grid that has 20 rows, the "Row Count" property is set to 20 and if I populate only 10 of those rows and don't update the "Total Rows" property then the 20 rows remain which is fine although the page controller doesn't show which I would like to see.

So now I populate 25 rows, I leave "Row Count" to 20 and update "Total Rows" to 25, the page controller then shows, I get the page count but when I go to the second page the number of rows shown drops to five and that isn't what I want.

So in the end I guess this boils down to two questions:

1. How do I have the Page Controller showing all the time?

2. How do I have the same number of rows showing all the time irrespective of what the total row count is?

Just in case anyone is wondering why I'm asking the above questions, as I said at the beginning it is about the look especially on one of my forms when I have a list box next to the grid and some buttons at the bottom of the form so when the number of rows shown in the grid decrease and/or the page controller gets shown I either end up with a lot of "empty" space between the last row of the grid and the buttons and the bottom of the list box or I have the bottom of the grid going of the top of the buttons, neither of which looks nice.




1. Please note that he page controls are part of the IWAdvWebGrid Controller which is always displayed (if Controller.Position is not set to cpNone), this does not depend on the number of rows or pages.
You can set Controller.ShowPagersAlways to True to always display the pager text if Controller.Pager is set to cpPrevNext or cpPrevNextFirstLast.

2. The number of rows displayed is dependent on the TotalRows value.
If you want to always have the same of rows displayed (event on the last page) you'll have to make sure the TotalRows value is a multiple of the RowCount value.