主頁 > 知識庫 > ASP.NET 固定標題列與欄位的具體實現(xiàn)

ASP.NET 固定標題列與欄位的具體實現(xiàn)

熱門標簽:地圖標注和認領 萊蕪外呼電銷機器人價格 智能電話營銷外呼系統(tǒng) 戶外地圖標注軟件手機哪個好用 長春呼叫中心外呼系統(tǒng)哪家好 鄭州400電話辦理 聯(lián)通 電銷語音自動機器人 凱立德導航官網(wǎng)地圖標注 五常地圖標注

APSX 頁面代碼: JS

復制代碼 代碼如下:
      
script src="../Js/jquery-1.8.3.min.js" type="text/javascript">/script>    -
    script src="../Js/jquery-ui-1.10.3.custom.js" type="text/javascript">/script>

    script src="../Js/gridviewScroll.min.js" type="text/javascript">/script>

    link href="../CSS/GridviewScroll.css" rel="stylesheet" type="text/css" />

//以上的文件都可以直接到網(wǎng)上下載的

    script type="text/javascript">

        $(document).ready(function() {
            gridviewScroll();
        });

        function gridviewScroll() {

//  因為我的GRIDVIEW 要放在一個DIV中所以要獲得對應的高度和寬度,一般直接數(shù)字設置就好了

            var gridWidth = $("#divservic").width();
            var gridHeight = $("#divservic").height();

            var headerHeight = $("#divHeader").height();

            gridHeight = gridHeight - headerHeight;

            $('#%=GridView2.ClientID%>').gridviewScroll({
            width: gridWidth,//寬度 一定不能用100%  可直接寫死
            height: gridHeight,//高度  可以直接寫死
            freezesize:4//控制頭幾列不動
            });
        }


復制代碼 代碼如下:

div id="divservic" style="width: 100%;margin-bottom: 2px; height:220px;">

                            asp:GridView ID="GridView2" runat="server" CellPadding="4" ForeColor="#333333" Width="100%"
                                BorderColor="#D1DDAA" AllowPaging="True" DataKeyNames="InstallationID"
                                OnPageIndexChanging="GridView2_PageIndexChanging"
                                onrowdatabound="GridView2_RowDataBound"
                                onrowdeleting="GridView2_RowDeleting" AutoGenerateColumns="False"
                                AllowSorting="True" onsorting="GridView2_Sorting">
                                RowStyle CssClass="GridviewScrollItem"  />>-------------------------------------------------------------這里的樣式要添加
                                FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                                PagerStyle CssClass="GridviewScrollPager"  />-------------------------------------------------------------這里的樣式要添加
                                SelectedRowStyle BackColor="#C5BBAF"  />
                                HeaderStyle CssClass="GridviewScrollHeader" />-------------------------------------------------------------這里的樣式要添加
                                EditRowStyle BackColor="#7C6F57" />
                                AlternatingRowStyle BackColor="White" BorderColor="#D1DDAA" />
                                Columns>
                                    asp:TemplateField>
                                        ItemTemplate>
                                            asp:CheckBox ID="ckbitem" runat="server" />
                                        /ItemTemplate>

                                    /asp:TemplateField>
                                 asp:BoundField DataField="InstallationID" HeaderText="InstallationID"
                                        SortExpression="InstallationID" />
                                    asp:BoundField DataField="Completed" HeaderText="Completed" />
                                    asp:BoundField DataField="Tid" HeaderText="Tid" />
                                    asp:BoundField DataField="Mid" HeaderText="Mid" />
                                    asp:BoundField DataField="Bank" HeaderText="Bank" />
                                    asp:BoundField DataField="Model" HeaderText="Model" />
                                    asp:BoundField DataField="Barcode" HeaderText="Barcode" />
                                    asp:BoundField DataField="DateReq" HeaderText="DateReq"
                                        SortExpression="DateReq" />

                                /Columns>
                            /asp:GridView>
                         /div>

標簽:衢州 西寧 岳陽 福州 西藏 宣城 湖州 紅河

巨人網(wǎng)絡通訊聲明:本文標題《ASP.NET 固定標題列與欄位的具體實現(xiàn)》,本文關鍵詞  ASP.NET,固定,標題,列,與,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡,涉及言論、版權(quán)與本站無關。
  • 相關文章
  • 下面列出與本文章《ASP.NET 固定標題列與欄位的具體實現(xiàn)》相關的同類信息!
  • 本頁收集關于ASP.NET 固定標題列與欄位的具體實現(xiàn)的相關信息資訊供網(wǎng)民參考!
  • 推薦文章