smartDBforms.NET API Reference

SmartPager Class

SmartPager is a pager control. The ControlIDToPage property specifies the ID of a SmartDBView control, which SmartPager will control. SmartPager allows the user to control the current data record displayed by SmartDBView.

For a list of all members of this type, see SmartPager Members.

System.Object
   Control
      WebControl
         SmartPager

[Visual Basic]
Public Class SmartPager
    Inherits WebControl
    Implements IDataItemContainer, INamingContainer
[C#]
public class SmartPager : WebControl, IDataItemContainer, INamingContainer

Remarks

SmartPager can display either its own predefined user interface or you can use the PagerTemplate template to create your own pager user interface. The PagerType property specifies the type of the predefined user interface. The predefined user interface is used only when the PagerTemplate property is not specified.

To create custom user interface you can modify the PagerTemplate property. SmartPager recognizes the several commands names. When a button inside PagerTemplate is pressed the command name is the value of its property CommandName.

Command Name Command Description
"First" Displays the first data record.
"Last" Displays the last data record.
"Prev" Displays the previous data record if possible. If the current data record is the first one, no action is taken.
"Next" Displays the next data record if possible. If the current data record is the last one, no action is taken.
"Page" The CommandArgument should contain a positive number which specifies the index of the data record to display. The page number should be one-based, not zero-based.
"NextGroup" Displays the first data record in the next page group. The page group displays only limited count of page numbers. The VisiblePageNumbers property determines the count of page numbers visible at once.
"PrevGroup" Displays the last data record in the previous page group. The page group displays only limited count of page numbers. The VisiblePageNumbers property determines the count of page numbers visible at once.

You can use standard data binding expressions to initialize the controls in the PagerTemplate. You can find description of the available properties during data binding in SmartPager.PagerDataItem class.

You can use controls which inherit from ListControl( such as DropDownList, ListBox ) as page selectors. You can bind them against AllPageNumbersCollection property. SmartPager automatically handles the SelectedIndexChanged event fired by the controls in the PagerTemplate template. It expects the SelectedValue property to be a positive integer which indicates the new page number.

In order to prevent a ListControl to change the page number simply add a custom property _NoPaging to the tag of the control and its SelectedIndexChanged event will be ignored. For example:

<asp:DropDownList ID=DropDownList1 AutoPostBack=true _NoPaging

Requirements

Namespace: Adillis.SmartDBForms

Assembly: Adillis.SmartDBForms (in Adillis.SmartDBForms.dll)

See Also

SmartPager Members | Adillis.SmartDBForms Namespace