I want the width of a DataGridView column after using FillWeight. Here is my code (C#, VS2015). I am trying to set textBox widths the same as dgv column widths. The last line of the code is my concern:
//Initialise dgv
//Set column widths for visual appeal
dgvPRD.Columns["INAME"].FillWeight = 200;
dgvPRD.Columns["IBATCH"].FillWeight = 150;
dgvPRD.Columns["DPQTY"].FillWeight = 100;
dgvPRD.Columns["IPUOMNAME"].FillWeight = 50;
dgvPRD.Columns["IQTY"].FillWeight = 100;
dgvPRD.Columns["INOTE"].FillWeight = 300;
//Initialise textBox locations and sizes
txtINAME.Left = this.Left + 41; //41 is the RowHeadersWidth of the dgv
txtINAME.Top = dgvPRD.ColumnHeadersHeight;
txtINAME.Width = dgvPRD.Columns["INAME"].Width; --> not working (it gives the original column width, before `FillWeight`)