如何在winforms中的datagrid中的列末尾设置链接 [英] how to set the link at end of the columns in datagrid in winforms
本文介绍了如何在winforms中的datagrid中的列末尾设置链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
目前我正在研究 win 表单(c# 背后的代码),我正在使用数据网格,并将链接保留在数据网格中.我的问题是,当我将链接保留在网格中时,它会显示在第一列,但我希望这些链接显示在网格的最后一列,请任何人帮助我......如何得到这个...
presently i working on win forms(code behind c#) in this i'm using data-grid and i keep the link in datagrid. My question is when i keep the links in grid it will show at first columns but i want these links show at last columns of the grid please anybody help me....... how to getting this...
推荐答案
我认为你可以通过
dataGridView1.Columns["Column7"].DisplayIndex = dataGridView1.Columns.Count - 1;
此处的 Column7 是您的 DataGridViewLinkColumn,通过设置 DisplayIndex,您可以确定现在将是最后一列的位置.
Here Column7 is your DataGridViewLinkColumn and by setting the DisplayIndex you determine the position which now would be the last column.
希望这会有所帮助.
这篇关于如何在winforms中的datagrid中的列末尾设置链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文