Problems with sorting within a Repeater

Asked

Viewed 163 times

0

I have to:

<asp:Repeater ID="rptDocumentosRepeater" runat="server"><%--onitemdatabound="listaDocumentosRepeater_ItemDataBound"--%>
    <HeaderTemplate>
        <legend class="uppercase">Lista de documentos</legend>
        <table id="tabelaUpload" class="uploadBens">
            <thead>
                <th width="200">
                    Tipo de documento
                </th>
                <th width="200">
                    Escolha o arquivo
                </th>
                <th>
                    Documentos enviados
                </th>
            </thead>
    </HeaderTemplate>
    <ItemTemplate>
        <tr>
            <td>
                <asp:HiddenField ID="hdfCdDocumento" runat="server" Value='<%# Eval("CdDocumentoBem")%>' />
                <asp:HiddenField ID="hdfCdTipoDocumento" runat="server" Value='<%# Eval("CdTipoDocumentoBem")%>' />
                <asp:HiddenField ID="hdfDsPathDocumento" runat="server" Value='<%# Eval("DsPathDocumento")%>' />
                <asp:HiddenField ID="hdfNmObrigatorio" runat="server" Value='<%# Eval("NmTipoObrigatorio")%>' />
                <asp:HiddenField ID="hdfForcarLiberacao" runat="server" Value="0" />
                <asp:Label ID="lblNmTipoDocumento" CssClass="tipoDocumento" Text='<%# Eval("NmTipoDocumentoBem")%>' runat="server" />
                <br />
                <asp:Label ID="lblObrigatorio" runat="server" Text='<%# Eval("NmTipoObrigatorio")%>' Font-Bold="True"></asp:Label>
            </td>
            <td class="ajusteTdIe">
                <asp:FileUpload ID="fiuDocumentoUpload" runat="server" CssClass="acessos" />
            </td>
            <td>
                <a href="/UpLoads/<%# Eval("DsPathDocumento")%>" class="linkUpload"><%# Eval("NmTipoDocumentoDown")%></a>
                <asp:Label ID="lblDtCriacao" runat="server" Text='<%# Eval("DtCriacao")%>' Font-Bold="True"></asp:Label>
                <asp:Label ID="lblNmUsuario" runat="server" Text='<%# Eval("NmUsuario")%>' Font-Bold="True"></asp:Label>
                <asp:Label ID="lblRecebeMotivoReprovacao" Text='<%# Eval("NmTipoMotivoRecusaBem")%>' runat="server" CssClass="motivoEscolhido" Visible="true" />
            </td>
        </tr>
    </ItemTemplate>
    <FooterTemplate>
        </table>
    </FooterTemplate>
</asp:Repeater> 

That one repeater it shows on the left side of the screen a series of documents to be loaded(their name, type, DUT, Invoice and etc). In the <TD> there is a button to upload the document. And in <TD> from the right, it shows the loaded doumento. Well what happens is that as I load the documents, it goes up to the top of the screen like this: Let’s say I have a list of 5 documents to upload. The first on the list would be Invoice and the last would be DUT. If I load the DUT first, after the load, it becomes the first and not the fifth as it should be. The problem is that the user loads and when changing position on the grid, the user thinks he has loaded the wrong one and this causes a huge dishonesty. The problem that the entity and the process that loads, has none Order By and would like to know if there is a way not to change the position of the fields on the screen. Force a non-sorting of the fields.

1 answer

1

I couldn’t do it in Repeater, so I added another field just to sort it out, it was the only resource I could get. In Peater I could not do.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.