如何在数据绑定后用空行填充datagrid的剩余空间 [英] how to fill remaining space of datagrid with empty rows after databind
本文介绍了如何在数据绑定后用空行填充datagrid的剩余空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
datagridview与数据绑定后我想用空行填充剩余空间。我怎么能这样做?
after datagridview's binding with data i want to fill remaining space with blank rows. how can i do this?
推荐答案
Hi Muhamad Faizan Khan,
据我所知,它是不可能将空行添加到绑定的DataGridView - 如果你真的想要空行,你必须将虚拟(模拟空数据)对象添加到你的数据源。
但是可能先问你的要求 - 也许你可以去绑定或手动排 - 绑定?
亲切的问候
Johannes
Hi Muhamad Faizan Khan,
From what I know, it's not possible to add empty rows to a bound DataGridView - if you really want "empty" rows you have to add "dummy" (simulating empty data) objects to your datasource.
But maybe question your requirement first - maybe you can either go for "binding" or manual row-"binding"?
Kind regards
Johannes
这篇关于如何在数据绑定后用空行填充datagrid的剩余空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文