打印数据网格视图 [英] Print Data Grid view

查看:73
本文介绍了打印数据网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网格中,列数将是动态的。所以,如果有3或4列,那就没关系。

但如果超过10列,则不适合A4尺寸。所以我想知道如何使用页边距或页面设置功能。谢谢

In my grid, number of columns will be dynamic. So if there is 3 or 4 columns, it was ok.
But if over 10 columns, it's not fit with A4 size. So I want to know how I can use page margin or page set up features. Thanks

推荐答案

查看此链接














www.c-sharpcorner.com/UploadFile/mgold/HowToPrintaDataGridinCsHARPand.NET11212005060838AM/HowToPrintaDataGridinCsHARPand.NET.aspx\"target =_ blanktitle =New Window> ^
]


function Print()
    {
     var sysOption="toolbar=yes,location=no,directories=yes,menubar=yes,scrollbars=yes,left=100,top=25";
     var winprint=window.open("","",sysOption);
      winprint.document.open();
               winprint.document.write(document.getElementById("GridView1").innerHTML);
        winprint.document.close();

        winprint.focus();
        winprint.print();
        winprint.close();
    }


这篇关于打印数据网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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