Pager helper

Pager provides paging functionality to modules.

Options

/// <summary>
/// Autohide if there is only one page
/// </summary>
public bool AutoHide { get; set; }

/// <summary>
/// Show first and last link
/// </summary>
public bool ShowFirstLast { get; set; }

/// <summary>
/// page index parameter name in url
/// </summary>
public string PageIndexParameterName { get; set; }

/// <summary>
/// Show prev and next link
/// </summary>
public bool ShowPrevNext { get; set; }

/// <summary>
/// Pager container eg: div
/// </summary>
public string PagerContainerTag { get; set; }

public string FirstText { get; set; }
public string LastText { get; set; }
public string PrevText { get; set; }
public string NextText { get; set; }
public string CurrentClass { get; set; }
public IDictionary<string, object> ContainterHtmlAttributes { get; set; }
public IDictionary<string, object> ListHtmlAttributes { get; set; }
public IDictionary<string, object> ListItemHtmlAttributes { get; set; }
public IDictionary<string,object> LinkHtmlAttributes { get; set; }

Usage

@Html.Pager(TotalItemCount, ItemsPerPage, CurrentIndex, new PagerOptions(), 
new { elementKey = ViewBag.ElementKey, .... })

Last edited Apr 6, 2012 at 7:07 PM by gzuri, version 5

Comments

No comments yet.