<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="GridView_Pagination._Default" %>

<%@ Register Assembly="C1.Web.Wijmo.Controls.48" Namespace="C1.Web.Wijmo.Controls.C1GridView" TagPrefix="cc1" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <style>
        /*pager*/
        .my-grid .wijmo-wijpager .ui-list {
            float: right;
        }
        /*number cell*/
        .my-grid .wijmo-wijgrid tr.wijmo-wijgrid-row td.wijdata-type-number {
            text-align: center ;
        }
        /*currency cell*/
        .my-grid .wijmo-wijgrid tr.wijmo-wijgrid-row td.wijdata-type-currency {
            text-align: center ;
        }
        /*datetime cell*/
        .my-grid .wijmo-wijgrid tr.wijmo-wijgrid-row td.wijdata-type-datetime {
            text-align: center ;
        }

    </style>

    <cc1:C1GridView ID="ConfigurationParamGrid" CssClass="my-grid" runat="server" 
                DataKeyNames="ID,PARAM,VALUE"
                AutogenerateColumns="False"                     
                Width="100%"                     
                EmptyDataText= "No existen parámetros de configuración" 
                AllowPaging="true" PageSize="25" 
                AllowSorting="True"
                ShowFilter="True"
                OnFiltering="ConfigurationParamGrid_Filtering" 
                OnRowCommand="ConfigurationParamGrid_RowCommand"
                OnSorting="ConfigurationParamGrid_Sorting"
                OnSorted="ConfigurationParamGrid_Sorted"
                OnPageIndexChanging="ConfigurationParamGrid_PageIndexChanging" 
                OnRowDataBound="ConfigurationParamGrid_RowDataBound"      
                ScrollMode="Both" 
                StaticHeader="True"
                VisualStyle="Vista"
                UseEmbeddedVisualStyles="true" 
                AllowColSizing="true"> 
            
        <Columns>
            <cc1:C1TemplateField DataField="ID" HeaderText="ID" SortExpression="ID" >
                <ItemTemplate>
                    <%# Eval("ID") %>
                </ItemTemplate>
            </cc1:C1TemplateField>
            <cc1:C1BoundField DataField="Name" HeaderText="Customer Name" Width="200px" />
            <cc1:C1BoundField DataField="Product" HeaderText="Product Purchased" Width="250px" />
            <cc1:C1BoundField DataField="Region" HeaderText="Region" Width="150px" />
            <cc1:C1BoundField DataField="Status" HeaderText="Order Status" Width="150px" />
            <cc1:C1BoundField DataField="Date" HeaderText="Order Date" Width="150px" />
            <cc1:C1TemplateField DataField="Total" HeaderText="Total Amount" Width="150px" >
                <ItemTemplate>
                    <%# String.Format("{0:c}", Eval("Total")) %>
                </ItemTemplate>
            </cc1:C1TemplateField>
        </Columns>
            
        <PagerSettings Mode="Numeric" Position="Bottom"/>
    </cc1:C1GridView>
</asp:Content>
