asp.net.ph

PagerSettings.Mode Property

System.Web.UI.WebControls Namespace   PagerSettings Class


Sets or retrieves the mode in which to display the pager controls in a control that supports pagination.

Syntax


Inline <pagerstyle mode = enumValue ... >
Script GridView.PagerSettings.Mode = enumValue

Property Value


enumValue One of the PagerButtons values.

The property is read/write with a default value of Numeric.

Exceptions


Exception Type Condition
ArgumentException The given value is not one of the PagerButtons values.

Remarks

Use the Mode property to specify which set of pager buttons to use in a control that supports pagination, such as the GridView, DetailsView, and FormView controls. You can specify buttons that link to the first, next, previous, and last buttons, or numeric buttons that link directly to a page.

For the list of valid values for the Mode property, see the PagerButtons enum.

Example

The following example demonstrates how to programmatically set the PagerSettings.Mode property at run time. This simple script dynamically changes the display mode of the pager based on the state of a CheckBox named chkNumbers.

plansGrid.PagerSettings.Mode = ( chkNumbers.Checked ) ?  
   PagerButtons.Numeric : PagerButtons.NextPrevious;

 Show me 

See Also

PagerSettings Members   PagerButtons Enum   Position   Visible Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph