打印本文 打印本文 关闭窗口 关闭窗口
有滚动条、固定Header的ASP.Net DataGrid实现
作者:武汉SEO闵涛  文章来源:敏韬网  点击数3599  更新时间:2009/4/23 10:43:52  文章录入:mintao  责任编辑:mintao
              //Adjust header row''''s height.

              + @"

                                                        headerTableRow.height = originalTableRow.offsetHeight;

                                                        " +

              //Adjust pager row''''s height, width.

              pagerID + @".rows[0].height = " + ID + @".rows[0].offsetHeight;

                                                        " +

              pagerID + @".style.width = " + ID + @".offsetWidth;

                                                        for (var i = 0; i < headerTableRow.cells.length; i++) {

                                                                headerTableRow.cells[i].width = originalTableRow.cells[i].offsetWidth;

                                                        }

                                                        " +

              //Also needs to adjust the width of the "<div>" at client side in addition to servier side,

              //since the Table''''s actual width can go beyond the width specified at server side under Edit mode.

              //The server side width manipulation is mainly for design-time appearance.

              divID + @".style.width = " + ID + @".offsetWidth + 20 + ''''px'''';

                                                                " +

              //The following script is for flow-layout. We cannot get the position of the control

              //on server side if the the page is with flow-layout.

              headerID + @".style.left = " + divID + @".offsetLeft;

                                                                " +

              headerID + @".style.top = " + divID + @".offsetTop + " + pagerID + @".offsetHeight;

                                                                " +

              headerID + @".style.position = ''''absolute'''';

                                                                " +

              pagerID + @".style.left = " + divID + @".offsetLeft;

                                                                " +

              pagerID + @".style.top = " + divID + @".offsetTop;

                                                                " +

              pagerID + @".style.position = ''''absolute'''';

       &nbs

上一页  [1] [2] [3] [4] [5]  下一页

打印本文 打印本文 关闭窗口 关闭窗口