<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_anagTipoLinee.ascx.cs" Inherits="GMW.WebUserControls.mod_anagTipoLinee" %>
<% if (false)
  { %>
<link href="../Content/Style.css" rel="stylesheet" type="text/css" />
<% } %>

<asp:HiddenField runat="server" ID="hfEnableForceSelect" Value="false" />
<asp:GridView ID="grView" runat="server" DataSourceID="ods" DataKeyNames="CodLinea" AutoGenerateColumns="False" AllowSorting="True" OnSelectedIndexChanged="grView_SelectedIndexChanged" CssClass="table table-striped table-condensed table-sm" AllowPaging="True" OnPageIndexChanged="grView_PageIndexChanged">
  <HeaderStyle CssClass="default" />
  <PagerStyle CssClass="active GridPager" />
  <PagerSettings Mode="NumericFirstLast" />
  <SelectedRowStyle CssClass="table-info" />
  <EmptyDataTemplate>
    Nessun Record
  </EmptyDataTemplate>
  <Columns>
    <asp:TemplateField ShowHeader="true" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="2em">
      <HeaderTemplate>
        <asp:LinkButton ID="lbtReset" runat="server" OnClick="btnReset_Click" CssClass="btn btn-sm btn-outline-info"><i class="fa fa-refresh"></i></asp:LinkButton>
      </HeaderTemplate>
      <ItemTemplate>
        <div style="white-space: nowrap;">
          <asp:LinkButton ID="lbtSelect" runat="server" CausesValidation="False" CommandName="Select" ToolTip='<%# traduci("Select") %>' Visible='<%# toBool(Eval("AddChildEnabled")) %>' CssClass="btn btn-sm btn-info"><i class="fa fa-search" aria-hidden="true"></i></asp:LinkButton>
        </div>
      </ItemTemplate>
      <ItemStyle HorizontalAlign="Center"></ItemStyle>
    </asp:TemplateField>
    <asp:BoundField DataField="CodLinea" HeaderText="CodLinea" ReadOnly="True" SortExpression="CodLinea" />
    <asp:BoundField DataField="Descrizione" HeaderText="Descrizione" SortExpression="Descrizione" />
    <asp:BoundField DataField="CodBlocco" HeaderText="CodBlocco" ReadOnly="True" SortExpression="CodBlocco" />
    <asp:BoundField DataField="CodCella" HeaderText="CodCella" ReadOnly="True" SortExpression="CodCella" />
  </Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ods" runat="server" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="GMW_data.DS_magazzinoTableAdapters.AnagLineeTableAdapter" OnInserting="recuperaFooter" FilterExpression=" IsParent = 1 AND ( CodLinea LIKE '%{0}%' OR Descrizione LIKE '%{0}%' OR CodBlocco LIKE '%{0}%' OR FormatoDtmx LIKE '%{0}%') ">
  <FilterParameters>
    <asp:SessionParameter DefaultValue="*" Name="ricerca" SessionField="valoreCercato" />
  </FilterParameters>
</asp:ObjectDataSource>
