0

我正在使用 jquery 数据表,以下是我正在使用的代码

function fnFixedColumnsTableTools() {
        var oTable = $(".datatable").dataTable({
                "bJQueryUI": true,
                "bSort": false,
                "aaSorting": [],
                "iDisplayLength": -1,
                "sScrollX": "100%",
                "sScrollXInner": "150%",
                "bScrollCollapse": true,
                "oLanguage": { "sUrl": "Scripts/jquery.dataTables-ES.txt" },
                "sDom": '<"H"Tf>t<"F"i>',
                "oTableTools": {
                    "sRowSelect": "multi",
                    "sSwfPath": "Scripts/copy_csv_xls_pdf.swf",
                    "aButtons": [{ "sExtends": "copy", "bSelectedOnly": "true" }, "xls", "csv", "pdf"]
                }
        });
        new FixedColumns( oTable, {
            "iLeftColumns": 3,
            "iLeftWidth": 350
        } );

这是我在数据表中使用的表。该表是动态的,并在侧服务器中创建列号

<asp:GridView ID="gvReport" runat="server" AutoGenerateColumns="True" EnableViewState="False" CssClass="display dataTable" >
            <Columns>
                <asp:TemplateField HeaderText="No.">
                    <ItemTemplate><%#Container.DataItemIndex + 1%></ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
4

0 回答 0