I'm using Visual Studio 2008. I have a DatagridView which contains four columns. I need:
to display the horizontal scrollbar in order to see all these columns and to display the last column so that it fills my datagridview To display the horizontal scrollbar I've set the ScrollBar property to Horizontal and used this code:
_formMain.GridCol_Name.Frozen = true;
_formMain.GridCol_Info.Frozen = true;
_formMain.DataCol_Position.Frozen = false;
_formMain.GridCol_Visibility.Frozen = true;
To show the last column so that it fills the remaining space in DatagridView I have used this code:
_formMain.Grid_NonAnatObj.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
_formMain.GridCol_Info.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
The problem is that the second code sample "removes" the horizontal trackbar.
How can I solve this problem? Thank you