以自定义格式打印Datagrid [英] Print Datagrid in custom format

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

问题描述

我想以以下格式打印数据网格
第一个用户名
下一个地址
下一个城市
下一个PinCode


例如:
约翰·史密斯       杰克·斯派洛
25,NewStreet   华盛顿大街50号
纽约       华盛顿
75896              89525



这些是我的datagrid列列

用户名,地址,PinCode

我正在使用Linq到sqlservercE作为我的数据源,并使用DevExpress Product xtra网格作为我的datagrid

还有一件事,这是我项目的最后阶段.
无论发生什么,我都想完成这种打印格式
我相信你们

在Advance中致谢

I want to print the data grid in the following format
first username
Next Address
Next City
Next PinCode


Eg :
JohnSmit           Jack Sparrow
25,NewStreet     50,Washington st
new york           Washington
75896               89525



these are my datagrid columns columns

UserName,Address,PinCode

I am using Linq to sqlservercE, as my datasource, and DevExpress Product xtra grid as my datagrid

One more thing, this is the final stage in my project.
I want to accomplish this printing format no matter what happens
I believe in you guys

Thanks in Advance

推荐答案

这是使用报告解决方案的地方,例如Crystal Reports.
This is where using a reporting solution comes in, such as Crystal Reports.


使它打印不无论发生什么事情都不是一个好习惯.
这会导致不良的编程和混乱的代码.

拥有带bug的优雅代码比坏的代码更好.


并且不要像Dave Kreskowiak所说的那样,尝试使用现有技术来重新发明轮子.
Making it print no matter what happens is not a good practice.
It leads to bad programming and kludgy code.

Better to have elegant code with bugs than a bad code that works.


And don''t try to reinvent the wheel, as Dave Kreskowiak says, use existing technology.


您将从< b> Repeater</b>或ListView控件中了解您可以在其中将这种类型的数据分组到一个Grid中,
将数据绑定到转发器或Listview中后,就可以使用javasript打印特定页面.
you will get some idea from <b>Repeater </b>or ListView Controls where you can group this type of data into one Grid ,
once you Bind the data in repeater or Listview you can use javasript to print specific page.


这篇关于以自定义格式打印Datagrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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