Author Topic: DataGridViewButtonColumn with DataTable  (Read 1595 times)

0 Members and 1 Guest are viewing this topic.

latour_g

  • Newt
  • Posts: 184
DataGridViewButtonColumn with DataTable
« on: January 12, 2016, 09:28:05 AM »
Hi,

I added a DataGridViewButtonColumn to my DataGridView after binding my DataTable to it.
So now I have all I need but I wonder if there is a way to reorder my DataGridViewButtonColumn because I don't want it at the end of the DataGridView.
If it's not possible, then I would need to place all my columns directly to the DataGridView without using DataTable ?

Thank you
« Last Edit: January 12, 2016, 09:47:12 AM by latour_g »

TJK44

  • Guest
Re: DataGridViewButtonColumn with DataTable
« Reply #1 on: January 12, 2016, 09:33:22 AM »
Add the columns in your datatable to the datagridview, then set the DataPropertyName to the name of the column in your datatable. You can order these columns anyway you would like to then.

latour_g

  • Newt
  • Posts: 184
Re: DataGridViewButtonColumn with DataTable
« Reply #2 on: January 12, 2016, 10:14:35 AM »
It works great.  Thank you so much !