I have a datagridview located in a tab of a tab control on a windows form. The data is populating to the grid with out any issues. My problem is that the sizing I'm making 2 of the column of data moves the last one partially off out side the normal size for the grid. I have Scrollbars set to both for the grid. But I do not get the Horizontal scroll bar. If I hover the mouse over the partially hidden cell I do see the full text in a tool tip.
Am I missing some thing on setting the scroll bars here.
Hmmm. I'm not sure then, but I feel like it has to be something with the settings of the columns...
If I put a DGV in a tabpage, and add 3 unbound columns, and set the individual columns AutoSizeMode property to AllCells, then I get this output
Note screen shot on the left is the initial view, and the one on the right is scrolled all the way over, showing that column3 displays its full text and I have a scrollbar.
the code is simply:
Code:
For i As Integer = 1 To 100
DataGridView1.Rows.Add("ABCDEFGHIJKLMNOPQRSTUVWXYZ", _
"ABCDEFGHIJKLMNOPQRSTUVWXYZ", _
"ABCDEFGHIJKLMNOPQRSTUVWXYZ")
Next
What is odd is that I'm doing something similar in another form in the app (many more columns returned) and it works as expected. I'm not that worried on it right now since you can double click a row to actually edit the SQL statement to run if you want.
The second column holds a discription of what the statement is suppoused to do that is actually the more important to see I guess.
hehe, yeah its one of those things easy to overlook. I would just dock it to fill in the tabpage, and that way if you change the tabpage size ever, the grid will change with it.