For anyone else that has this problem, or is interested, I found that the
DataGrid calculates the LargeChange to the number of displayed
TotallyVisible rows. So if the rows get larger as you scroll down there
will not be enough scroll bar positions available to see all of the rows
(depending on heights). To fix this I calculate what the LargeChange should
be on the Grid's size changes and when the Grid is sorted. I also do this
calculation the first time the Grid is Painted.
I determined that the LargeChange should calculated looking at the largest
heights and working my way toward the smaller heights. I add up larger
heights until I can't fits anymore in the height of the grid. I take this
number of totally visible, tallest rows and set the LargeChange equal to it.
-n
[quoted text, click to view] "nate axtell" <naxtell at progeny dot net> wrote in message
news:O8wg0U6sFHA.3424@TK2MSFTNGP11.phx.gbl...
> In VB .NET I've created custom TextBox columns that auto-adjust row height
> due to wrapping and multi-line text. The VScrollBar doesn't have the
> correct settings after the heights are adjusted, so it doesn't scroll down
> to show the entire list of data. It appears to be calculating the Maximum
> and/or Changes incorrectly with regard to the adjusted row heights.
> Note: I am ajusting row heights within the GetMinimumHeight method of the
> TextBox column class. So when the DataGrid actually goes to paint a row
> it has the correct height that it needs stored in the "get_DataGridRows"
> collection.
> Is there a way that I can find the total height of the scrollable area,
> not just clientarea hight?
> Or does anyone have another suggestion on how to manipulate the DataGrid's
> VScrollBar?
> I was thinking about checking the values and changing them in the
> DataGrid's Paint method.
>