如何冻结表数据网格,具有无限的行和列上市头和第一列? [英] How to freeze header and first column of a Table data grid listing with unlimited rows and columns?

查看:189
本文介绍了如何冻结表数据网格,具有无限的行和列上市头和第一列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp.NET网格无限列和行上市。这正显示出作为搜索(某种工作的历史数据)的结果。根据不同的搜索条件,在没有。列的和没有。行会增加。

I have an asp.NET grid listing with unlimited columns and rows. This is showing as a result of search (some kind of work history data). Depending on the search criteria, the no. of columns and no. of rows will increase.

我需要修复/冻结第一行(头部)3列在左边(即3列需要显示的内容,所有的时间和休息可以滚动)。

I need to fix/freeze first row (header portion) and 3 columns on the left (that 3 columns need to show all the time and rest of the contents can scroll).

在code页面这么多内容是可见的。

in the code page this much content is visible

< D​​IV的风格=高度:500像素;溢出:汽车>
    < ASP:GridView控件ID =someid=服务器>
    < / ASP:GridView的>结果
    < / DIV>

标题栏是动态来了,'N'没有。航向会(如2016年4月,1026年5月等..),因此对于每一个标题不能申请'身份证'。也是相同的前3左列。这个解决的办法?

The header columns are dynamically coming and 'n' no. of heading will come (like April 2016, May 1026 and so on..), so cannot apply 'id' for each heading. also the same for the first 3 left columns. Any solution for this?

在此先感谢

推荐答案

看看这个 gridviewscroll 撑着,在这里你找到一个jQuery撑着,来完成你想要的东西。

Take a look at this gridviewscroll pluggin, here you find a jquery pluggin to accomplish what you want

和您添加适当的 CSS后 JS 文件code,你应该用的是这样的:

and after you add the proper css and js files the code you should use is this:

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

    function gridviewScroll() { 
        $('#<%=someid.ClientID%>').gridviewScroll({ 
            width: 660,   //change this two values by
            height: 200,  //your real width and height
            freezesize: 3 
        }); 
    } 

这篇关于如何冻结表数据网格,具有无限的行和列上市头和第一列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆