如何在Datagridview的最后(“假")行中隐藏按钮? [英] How to hide button in last(“fake”) row of Datagridview?
问题描述
In my dgv I have a DataGridViewButtonColumn which adds a "delete row" button to each row. However, a button also gets created for the "fake" row at the bottom of the dgv, which makes no sense in this context because that row does not correspond
to a record yet. What is a good way to hide that button, or at least paint over it? I came across this page which shows a method that might do the trick, but I was wondering
if there is a better way to do this for this particular situation. 请为数据网格设置CanUserAddRows = false和CanUserDeleteRows = false以及IsReadOnly = true. Please set the CanUserAddRows=false and CanUserDeleteRows=false and IsReadOnly=true for the datagrid. 这篇关于如何在Datagridview的最后(“假")行中隐藏按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!推荐答案