databound datagridview添加空行 [英] databound datagridview add empty row

查看:318
本文介绍了databound datagridview添加空行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我有一个带客户表的sql数据库.使用linq到sql填充datagridview.客户按姓氏分组.
我希望datagridview在每个以不同字母开头的组之前自动插入一个空行.
仅在打印datagridview而不更新数据库时才需要.
如果要打印网格视图,也许您想创建一个水晶报表或任何重新排序工具来实现此目的. :)


感谢iamsupergrasya
通过将不可见的数据网格视图导出到 csv ,我得到了 解决的问题>文件 在同一时间时间将客户插入空白行.i中的code-keyword>来自同一csv的进入到另一个来自,在 中的数据数据库保持不变.
kleinyster 


hi i have a sql database with a customer table.the datagridview is populated by using linq to sql.the customers is grouped by surname.
i want the datagridview to automatically insert an empty row before each group that starts with a different letter.
this is only neccessary for printing the datagridview and not to update the database.
thanks

解决方案

if it is for printing the gridview, maybe you want to create a crystal report or any reorting tool to achieve this. :)


thanks iamsupergrasya
i got the problem solved by exporting an invisible datagridview to a csv file and at the same time grouping the customers by surname and inserting a blank row.i then import from the same csv file into another datagridview that is visible.from there on its just printing and the data in the database remains unmodified.
kleinyster


这篇关于databound datagridview添加空行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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