如何使用按钮将网格视图单元从一个位置移动到另一位置(在运行时) [英] How to move the grid view cell from one position to another (at Run Time) using buttons
本文介绍了如何使用按钮将网格视图单元从一个位置移动到另一位置(在运行时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的查询是如何使用(Windows Form !!)中的按钮将datagridview单元格位置从一个位置移动到另一位置
例如:在datagrid视图中,我有第一列作为名称"归档,我需要在运行时将名称"(带有数据)移动到第四列!
新手!!
Hi,
My query is how can i move the datagridview cells position''s from one position to another position using buttons in (Windows Form!!)
Ex: In a datagrid view i have 1st column Filed as "Name" i need to move the "Name"(with Data''s) at run time to 4th column!!
New to this!!
help me soon
推荐答案
您可以设置每列的DisplayIndex
:
http://msdn.microsoft.com/zh-cn/library/system.windows.forms.datagridviewcolumn.displayindex%28VS.80%29.aspx [ http://stackoverflow.com/questions/2021739/net-reorder-datagridview-columns-运行时 [ ^ ]
希望对您有所帮助.
You can setDisplayIndex
of each column :
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcolumn.displayindex%28VS.80%29.aspx[^]
Also have a look at this page :
http://stackoverflow.com/questions/2021739/net-reorder-datagridview-columns-at-runtime[^]
Hope it helps.
这篇关于如何使用按钮将网格视图单元从一个位置移动到另一位置(在运行时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文