首页 > 解决方案 > 带有来自 SQL asp 网络服务器端的数据的 jQuery DataTable 子行

问题描述

我一直在使用带有 asp net repeater 的 jquery 数据表,避免了 gridview 的沉闷外观,现在我想尝试使用 listview 添加子行,但我不知道该怎么做,因为每个示例都使用 jquery 和 ajax . 这只是一个使用静态文本暂时绑定表格并进行测试的示例

<asp:Repeater ID="rptArtigos" runat="server">
    <HeaderTemplate>
        <table id="tblArtigos" class="table table-bordered dataTable">
            <thead class="thead-dark">
                <tr>
                    <th style="width: 20px;">ID</th>
                    <th style="width: 120px">Ref. Cliente</th>
                    <th style="width: 100px">Ref. Interna</th>
                    <th style="width: 100px">Nome</th>
                    <th style="width: 100px">Logística</th>
                    <th style="width: 100px">Estado</th>
                    <th style="width: 10px;">Editar</th>
                    <th style="width: 10px;">Validar</th>
                    <th style="width: 10px;">Rejeitar</th>
                </tr>
            </thead>
        </HeaderTemplate>
        <ItemTemplate>
            <tbody>
                <tr>
                    <td>1</td>
                    <td>REF12345</td>
                    <td>123456</td>
                    <td>User</td>
                    <td>Não Validado</td>
                    <td>Criado</td>
                    <td class="text-center">
                        <asp:ImageButton ImageUrl="/Images/Buttons/edit.png" CssClass="" Width="25" runat="server" />
                    </td>
                    <td class="text-center">
                        <asp:ImageButton ImageUrl="/Images/Buttons/success.png" CssClass="" Width="25" runat="server" />
                    </td>
                    <td class="text-center">
                        <asp:ImageButton ImageUrl="/Images/Buttons/x-button.png" CssClass="" Width="25" runat="server" />
                    </td>
                </tr>
            </tbody>
        </ItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
   </asp:Repeater>

我不知道从哪里开始。我想我应该添加另一列并在其中编码列表视图。问题是使按钮显示列表视图

标签: jqueryasp.netdatatableswebformsasprepeater

解决方案


推荐阅读