The grid in this demo shows how to use letters instead of numbers in the grid pager
and filter the records according to the letter the user chooses from the pager.
This is not built-in Telerik RadGrid feature, however it is quite easily attainable
with custom code. To integrate this type of paging mechanism for your grid instance,
you need to:
- Wire the ItemCreated event of the control and detect whether the currently bound
item is GridPagerItem
- Clear the Controls collection of the GridPagerItem PagerContentCell
- Generate LinkButtons with one and the same CommandName of your choice and
CommandArgument matching the Unicode code for the corresponding character
- Add these buttons to the Controls collection of the PagerContentCell
- Subscribe to the ItemCommand event of the grid and check whether
e.CommandName is the command name you specified for the LinkButtons
- Filter the records in the grid source in par with the e.CommandArgument value and
refresh the source content
- Rebind the grid calling its Rebind() method
Note: We chose the
PagerStyle -> AlwaysVisible = true option for the grid pager
to allow the page navigation regardless of the number of records returned.
More info regarding the built-in paging feature of Telerik RadGrid you can find in the
Paging help chapter:
Paging