在.Net Window应用程序中添加新列 [英] add new column in .Net Window Application
本文介绍了在.Net Window应用程序中添加新列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我正在使用.Net窗口应用程序.
我有1个grideview,并且要在gridview中添加1个按钮.
但是该按钮出现在第一列中.
我希望它位于边界列的最后一列或中间.
为什么我不能对表中的列重新排序?
就像在asp.net gridview中一样.
Hi
I am using .Net window application.
I have 1 grideview and I am adding 1 button in gridview.
But the button appears in the first column.
I want it to be in the last column or mid of my bounds column.
Why can''t I reorder the column in the table?
Like in asp.net gridview.
推荐答案
如何添加列? 您可以使用
How you add the column?
You can use
DataGridView1.Columns.Insert(index, New DataGridViewButtonColumn());
您可以使用列的DisplayIndex
重新排序现有列.
You can use DisplayIndex
of a column to reorder existing columns.
这篇关于在.Net Window应用程序中添加新列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文