Hey guys,
I am dynamically building a datagridview and above each of the columns there is going to be a combobox which allow the datagridview to be filtered. The columns of the datagridview are going to be resizeable and so i need the combobox's above each column to resize as well. I can do this programatically but i wanted to use Data binding, my thoughts were it was really basic and here are the lines to do it....
ComboBox theFilter;
DataGridViewTextBoxColumn theColumn = new DataGridViewTextBoxColumn();
theFilter.DataBindings.Add("Width", theColumn, "Width");
If you can please tell me why this isn't working that would be great. What i have noticed is:
1. If i set the column.width = x, then the combobox will resize only once i leave clicked in the combobox and leave it.
2. If i resize the column by clicking on the column divider and dragging it when i click in the combobox and leave it the column resizes.
Cheers
Kris