<%@ Page Title="Home Page" Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
    Inherits="_Default" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<html>
<head>
    <title>Test</title>
</head>
<body>
    <form id="Form1" runat="server">
    <asp:ScriptManager runat="server" ID="ScriptManager1">
    </asp:ScriptManager>
    <telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="SqlDataSource1" GridLines="None"
        Width="100%" AllowAutomaticUpdates="True" AllowPaging="True" CellSpacing="0"
        AutoGenerateColumns="False">
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="top" DataSourceID="SqlDataSource1"
            EditMode="InPlace">
            <CommandItemSettings ExportToPdfText="Export to PDF" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px" />
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px" />
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridClientSelectColumn>
                </telerik:GridClientSelectColumn>
                <telerik:GridBoundColumn DataField="ContactTitle" FilterControlAltText="Filter OrdenTrabajoID column"
                    HeaderText="ContactTitle" SortExpression="ContactTitle" UniqueName="ContactTitle"
                    Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="CompanyName" DataType="System.Int32" FilterControlAltText="Filter CitaID column"
                    HeaderText="CompanyName" SortExpression="CompanyName" UniqueName="CompanyName"
                    Visible="False">
                </telerik:GridBoundColumn>
                <telerik:GridDropDownColumn DataField="ContactName" DataSourceID="SqlDataSource1" FilterControlAltText="Filter ProductoId column"
                    HeaderText="ContactName" ListTextField="ContactName" ListValueField="ContactName"
                    UniqueName="GridDropDownColumn">
                </telerik:GridDropDownColumn>
                <telerik:GridNumericColumn DataField="CustomerID" FilterControlAltText="Filter Cantidad column"
                    HeaderText="CustomerID" SortExpression="CustomerID" UniqueName="CustomerID">
                </telerik:GridNumericColumn>
                <telerik:GridBoundColumn DataField="Address" FilterControlAltText="Filter Precintos column"
                    HeaderText="Address" SortExpression="Address" UniqueName="Address">
                </telerik:GridBoundColumn>
            </Columns>
            <CommandItemTemplate>
                <asp:LinkButton ID="lnkAdicionar0" runat="server" CommandName="InitInsert" Visible="true"><img 
                    border="0" src="../../Imagenes/adicionar.gif" /> Nuevo Producto</asp:LinkButton>
                <asp:LinkButton ID="lnkInsertar0" runat="server" CausesValidation="true" CommandName="PerformInsert"
                    Visible="<%# RadGrid2.EditIndexes.Count = 0 And RadGrid2.MasterTableView.IsItemInserted%>"><img 
                    border="0" src="../../Imagenes/actualizar.gif" /> Agregar Producto</asp:LinkButton>
                <asp:LinkButton ID="LnkEditarSel0" runat="server" CausesValidation="False" CommandName="EditSelected"><img border="0" 
                    src="../../Imagenes/editar.gif" /> Editar Producto</asp:LinkButton>
                <asp:LinkButton ID="lnkActualizar0" runat="server" CausesValidation="true" CommandName="UpdateEdited"
                    Visible="<%# RadGrid2.EditIndexes.Count > 0%>"><img 
                    border="0" src="../../Imagenes/actualizar.gif" /> Actualizar Producto</asp:LinkButton>
                <asp:LinkButton ID="lnkCancelar0" runat="server" CausesValidation="False" CommandName="CancelAll"
                    Visible="<%# RadGrid2.EditIndexes.Count > 0 or RadGrid2.MasterTableView.IsItemInserted %>">
                         <img border="0" src="../../Imagenes/cancelar.gif" /> Cancelar</asp:LinkButton>
            </CommandItemTemplate>
            <EditFormSettings>
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView><ClientSettings>
            <Selecting AllowRowSelect="true"></Selecting>
        </ClientSettings>
        <EditItemStyle CssClass="TextosGrillas" />
        <HeaderStyle CssClass="TextosGrillas" />
        <ItemStyle CssClass="TextosGrillas" />
        <SelectedItemStyle CssClass="TextosGrillas" />
        <CommandItemStyle CssClass="CommandItemStyle" />
        <FooterStyle CssClass="TextosGrillas" />
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM Customers"
        runat="server"></asp:SqlDataSource>
    <asp:ObjectDataSource ID="dsDetalleOrdenTrabajo" runat="server" SelectMethod="ObtenerDetalleOrdenTrabajoFiltradoTable"
        TypeName="WarrantsNet.Negocio.Administracion.ProcesoNegocio.CitaPN">
        <SelectParameters>
            <asp:Parameter Name="_Cita" Type="Object" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="dsproductos" runat="server" SelectMethod="ObtenerProductoFiltrado"
        TypeName="WarrantsNet.Negocio.Administracion.ProcesoNegocio.ProductoPN">
        <SelectParameters>
            <asp:Parameter Name="_Producto" Type="Object" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>
