Search results

Pager

Represents the Pager component.

<div id="pager"/>
<script>
  var pagerObj = new Pager({ totalRecordsCount: 50, pageSize:10 });
  pagerObj.appendTo("#pager");
</script>

Properties

click

EmitType<Object>

Triggers when click on the numeric items.

Defaults to null

containerModule

NumericContainer

containerModule is used to manipulate numeric container behavior of Pager.

created

EmitType<Object>

Triggers when Pager is created.

Defaults to null

cssClass

string

Defines the own class for the pager element.

Defaults to

currentPage

number

Defines the current page number of pager.

Defaults to 1

customText

string

Defines the customized text to append with numeric items.

Defaults to null

Triggers after pageSize is selected in DropDownList.

Defaults to null

enableExternalMessage

boolean

If enableExternalMessage set to true, then it adds the message to Pager.

Defaults to false

enablePagerMessage

boolean

If enablePagerMessage set to true, then it adds the pager information.

Defaults to true

enablePersistence

boolean

Enable or disable persisting component’s state between page reloads.

Defaults to false

enableQueryString

boolean

If enableQueryString set to true, then it pass current page information as a query string along with the URL while navigating to other page.

Defaults to false

enableRtl

boolean

Enable or disable rendering component in right to left direction.

Defaults to false

externalMessage

string

Defines the external message of Pager.

Defaults to null

externalMessageModule

ExternalMessage

externalMessageModule is used to manipulate external message of Pager.

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to

pageCount

number

Defines the number of pages to display in pager container.

Defaults to 10

pageSize

number

Defines the records count of visible page.

Defaults to 12

pageSizes

boolean | []

If pageSizes set to true or Array of values, It renders DropDownList in the pager which allow us to select pageSize from DropDownList.

Defaults to false

pagerMessageModule

PagerMessage

pagerMessageModule is used to manipulate pager message of Pager.

template

string | Function

Defines the template as string or HTML element ID which renders customized elements in pager instead of default elements.

Defaults to null

totalRecordsCount

number

Gets or Sets the total records count which is used to render numeric container.

Defaults to null

Methods

addEventListener

Adds the handler to the given event listener.

Parameter Type Description
eventName string A String that specifies the name of the event
handler Function Specifies the call to run when the event occurs.

Returns void

appendTo

Appends the control within the given HTML element

Parameter Type Description
selector (optional) string | HTMLElement Target element where control needs to be appended

Returns void

attachUnloadEvent

Adding unload event to persist data when enable persistence true

Returns void

dataBind

When invoked, applies the pending property changes immediately to the component.

Returns void

destroy

To destroy the Pager component.

Returns void

destroyTemplate

Destroys the given template reference.

Parameter Type Description
propertyNames (optional) string[] Defines the collection of template name.
index (optional) any Defines the index

Returns void

detachUnloadEvent

Removing unload event to persist data when enable persistence true

Returns void

getLocalData

Returns the persistence data for component

Returns any

getLocalizedLabel

Gets the localized label by locale keyword.

Parameter Type Description
key string specifies the key

Returns string

getRootElement

Returns the route element of the component

Returns HTMLElement

goToPage

Navigate to target page by given number.

Parameter Type Description
pageNo number Defines page number.

Returns void

handleUnload

Handling unload event to persist data when enable persistence true

Returns void

refresh

Refreshes page count, pager information and external message.

Returns void

removeEventListener

Removes the handler from the given event listener.

Parameter Type Description
eventName string A String that specifies the name of the event to remove
handler Function Specifies the function to remove

Returns void

Inject

Dynamically injects the required modules to the component.

Parameter Type Description
moduleList Function[] ?

Returns void