Setup

  1. Add reference to the ASPControlsExtended.Controls.dll to the web project
  2. Add the following in web.config
<pages>
      <controls>
        <add assembly="ASPControlsExtended.Controls" namespace="ASPControlsExtended.Controls" tagPrefix="aspextended"/>
      </controls>
</pages>

Controls

GridView

Show arrow indicating the column and the direction being sorted.
sorting.png
<aspextended:GridView id="gvSorting" runat="server"
    AllowPaging="false"
    AllowSorting="true"
    GridLines="None"
    CssClass="gridView"
    RowStyle-CssClass="gridrow"
    AlternatingRowStyle-CssClass="gridaltrow"
    PagerStyle-CssClass="gridpagerrow"
    HeaderStyle-CssClass="gridheader"
    OnPageIndexChanging="gvPaging_PageIndexChanging"
    AutoGenerateColumns="false"
    SortArrowVisible="true"
    OnSorting="gvSorting_Sorting"
    ArrowPosition="Left">
    <Columns>
        <asp:BoundField DataField="Product" SortExpression="Product" HeaderText="Product" />
        <asp:BoundField DataField="Category" SortExpression="Category" HeaderText="Category" />
        <asp:BoundField DataField="Quantity" SortExpression="Quantity" HeaderText="Quantity" />
    </Columns>
</aspextended:GridView>

Show text indicating the total item count
itemcountnopaging.png
<aspextended:GridView id="gvNoPaging" runat="server"
    AllowPaging="false"
    CssClass="gridView"
    RowStyle-CssClass="gridrow"
    AlternatingRowStyle-CssClass="gridaltrow"
    PagerStyle-CssClass="gridpagerrow"
    GridLines="None"
    HeaderStyle-CssClass="gridheader"
    ItemCountVisible="true"
    ItemCountCssClass="itemcount"
    ItemCountText="Showing {2} products."
    OnPageIndexChanging="gvPaging_PageIndexChanging">

</aspextended:GridView>

Show text with item index displayed next to standard GridView pager.
itemcountpaging.png
<aspextended:GridView id="gvPaging" runat="server"
    AllowPaging="true"
    PageSize="5"
    CssClass="gridView"
    RowStyle-CssClass="gridrow"
    AlternatingRowStyle-CssClass="gridaltrow"
    PagerStyle-CssClass="gridpagerrow"
    GridLines="None"
    HeaderStyle-CssClass="gridheader"
    ItemCountVisible="true"
    ItemCountCssClass="itemcount"
    ItemCountText="Showing {0} to {1} out of {2} products."
    OnPageIndexChanging="gvPaging_PageIndexChanging">

</aspextended:GridView>

Last edited May 29, 2014 at 5:50 PM by dnair926, version 7