I'm currently working on a Winforms project that has a datagridview in it, on which I display my users list. I want to add (in addition to the basic parameters that are all int and string etc.) a button in the last column that will have an OnClick listener. Problem is, I don't have a dataSource and I'm working with a BindingList and BindingSource object; I've tried to add a button variable to the class that's displayed in the grid and it didn't work; I couldn't find a way to convert Button to DataGridViewCell. How do I add a button at the end of every row?
code:
var bindingList = new BindingList<userDisplay>(usersListDGV); //userDisplay has int and string variables
var source = new BindingSource(bindingList, null);
usersDGV.DataSource = source;