使用Jquery或javascript隐藏asp.net gridview的网格线 [英] Hide gridlines of asp.net gridview using Jquery Or javascript

查看:81
本文介绍了使用Jquery或javascript隐藏asp.net gridview的网格线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用grdiview的IAm,其中iam使用print选项,问题是我想使用javascript或jquery删除网格线,我不想在codebehind或gridview属性中的代码,当printdiv函数被调用时grdilines应该会消失.grd是asp gridview的名字。请提供一些建议。





 function printDiv (divID){



$(<% = grd.ClientID %> tr)。css({'border-color':'White','border-width':'0px'});
$(<% = grd.ClientID %> )。attr( 边界,0);

}

解决方案

<% = grd.ClientID %> tr)。css({'border-color':'White','border-width':'0px'} );


<% = grd.ClientID %> \").attr(\"border,0);

}


您好,为什么不使用单独的CSS进行打印?这似乎是最容易实现的。


IAm using the grdiview ,in which iam using the print option,problem is i want to remove the gridlines using javascript or jquery, i dont want the code in the codebehind or in the gridview property,when the printdiv function is called the grdilines should disappear.grd is the asp gridview name.kindly provide some suggestions.


function printDiv(divID) {



$("<%=grd.ClientID %> tr").css({ 'border-color': 'White', 'border-width': '0px' });
$("<%=grd.ClientID %>").attr("border", "0");

}

解决方案

("<%=grd.ClientID %> tr").css({ 'border-color': 'White', 'border-width': '0px' });


("<%=grd.ClientID %>").attr("border", "0"); }


Hi, why not use a separate CSS for printing? That seems that it would be the easiest to implement.


这篇关于使用Jquery或javascript隐藏asp.net gridview的网格线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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