简体   繁体   中英

how to set the link at end of the columns in datagrid in winforms

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...

I think you can achieve this by

dataGridView1.Columns["Column7"].DisplayIndex = dataGridView1.Columns.Count - 1;

Here Column7 is your DataGridViewLinkColumn and by setting the DisplayIndex you determine the position which now would be the last column.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM