Easily implement paging control in UltraWeBGRID
When you use Grid, you always complain that the page features of Grid are too weak. You cannot meet your needs. This is like this in the MS DataGrid and NetAdvantage's 2004vol3. Grid always requires us to display and operate according to its requirements. Starting from Netadvantage 2004 Vol 3, UltraWebGrid has made a lot of strengthening on page display, I will briefly introduce, how I use it. I want to achieve the effect picture: It is also very simple, just wants to display some custom information on the left place. Let's start: 1) Drag a UltraWeBGrid to the interface, and then the background is binding, I don't say it, everyone has its own way. 2) Set with a format to right-click UltraWebGrid, select Quick Design, then pick your favorite template in the pop-up window (this is almost the same as MS DataGrid): Remember To click: Apply Preset can take effect. 3) Define a lot of panelings in UltraWebGrid, we expand DisplayLayout-> Pager properties, as shown: Set uppaging = true; // This will be able to see the page with QuickPages, setting QuickPages = 4, this is a description The interface is displayed as "the four paging numbers in front". Then set our pattern, this template is used from the definition display effect, in this PARTERN, provides some domains to define: I think everyone knows what it means to know in English. In order to achieve the style in the renderings, I am defined as:
<
TABLE
Width
= 100%>
Align
= Left> Page: [CurrentPageIndex] / [PageCount]
Page: [Pagesize] TD
> <
TD
Align
= Right> [Default]
[Default] It is best to be sure. It is different ways with different paging modes.
[Page: 1: First]: In this way, 1 point of the paging number becomes the word "first page", I haven't found this function to use it better.
What is the most disappointed here is that there is no number of recordcount records, I want to implement this, I have to automatically add the code in the background. Ok, the method is that it is so simple. What do you want to define? 4) Page Code Implementation: The code for paging is very simple, add the pageIndexchange event to UltraWebGrid:
Private
Void
UltraweBGrid2_pageIndexchanged (
Object
Sender, Infragistics.Webui.UltraweBgrid.pageEventArgs E)
{This.ultrawebgrid2.displaylayout.pager.currentpageindex = E.NewpageIndex; this.ultrawebgrid2.database ();
Ok, everything is fine. Of course, you can do more beautiful.
I am very unbursed. What third-party paging control is very unbursed, and those controls are not integrated with GRID, unless you have used it. Moreover, the third party's paging control emphasizes a "high-performance" paging concept, and I also discussed the necessity of this, and I have a small necessity. Please refer to:
Please discuss the necessity of high performance paging!
And the paging of Grid comes with very easy implementation, integration is also the best.