Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/384.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript .Net响应Gridview_Javascript_Asp.net_Twitter Bootstrap_Gridview - Fatal编程技术网

Javascript .Net响应Gridview

Javascript .Net响应Gridview,javascript,asp.net,twitter-bootstrap,gridview,Javascript,Asp.net,Twitter Bootstrap,Gridview,我正在使用一个带有引导的asp.net站点。有一个从安装的扩展,用于在更新面板中处理gridview响应 在笔记本电脑/个人电脑上进行测试时,它是有效的,但在通过手机使用gridview查看页面时,它却无法工作。我测试的是安卓系统 它的作用:创建两个表实例,一个成为静态列,另一个具有包含可滚动数据的溢出容器 要查看使用此代码的gridview示例,请转到。 单击标题中的“我的帐户”链接。 资格证书 用户名:testing@testing.com 密码:SoTesting1! 将浏览器的宽度调整为

我正在使用一个带有引导的asp.net站点。有一个从安装的扩展,用于在更新面板中处理gridview响应

在笔记本电脑/个人电脑上进行测试时,它是有效的,但在通过手机使用gridview查看页面时,它却无法工作。我测试的是安卓系统

它的作用:创建两个表实例,一个成为静态列,另一个具有包含可滚动数据的溢出容器

要查看使用此代码的gridview示例,请转到。 单击标题中的“我的帐户”链接。 资格证书 用户名:testing@testing.com 密码:SoTesting1! 将浏览器的宽度调整为600px或更小,以便脚本生效。源代码将显示两个表-静态列,然后是溢出容器中的可滚动表

我真的需要往正确的方向推一下。我在这里发布了完整的javascript文件:。一个小样本(需要共享fiddle链接):

//通过对照其父树检查表宽度来检测溢出
功能设置响应表(表){
tableWidth=table.width();
if(table.parent().hasClass(_overflowContainer)){
tableWidth+=$('.+\u staticContainer).width();
}
isResponsive=假;
table.parents().每个函数(){
if(!$(this).hasClass(\u overflowContainer)
&&tableWidth>$(此).width()
) {
isResponsive=真;
//各个击破
返回(假);
}

})
对于需要此功能的任何其他人。在jquery.responsivetable.js的第118行,查找以下代码块:

                table.before(tableStatic);

            table.wrap(_divClass + _overflowContainer + '" style="float:left;' + _overflow + ':scroll;' + _overflow + '-y:hidden;"/>');
            tableStatic.wrap(_divClass + _staticContainer + '" style="float:left;"/>');

            if (options.scrollHintEnabled) {
                setupScrollHint(table, tos);
            }
            //This line added courtesy Marty. The class "table" is from bootstrap. When present on the table contained in the overflow div, it causes column headers to shift to the left instead of aligning with their respective column data. jc 12/17/14 
            ***table.removeClass("table");***           
        }
最后一行“table.removeClass(“table”);”就是这个技巧的最终结果