DataGridView setting Row height in code and disable manual resize
问题 In my grid I had following line of code which disabled user's manual resizing: dgvTruckAvail.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; Now I needed to set column height in code and it didn't work (see DataGridView setting row height doesn't work) I figured that it was this line of code that caused non-sizing issue. However, now I need to figure out how to Size rows in code and Prevent user sizing rows themselves Any pointers? 回答1: Set: dgvTruckAvail.AutoSizeRowsMode =