Dim lr As Integer = DataListInfo1.Rows.Count - 1
Dim rowHeigthSum As Integer
For n = 0 To lr
rowHeigthSum += DataListInfo1.Rows(n).Height
Next n
lr = DataListInfo1.Rows.Count - 1
DataListInfo1.Rows(lr).Height = CInt(DataListInfo1.Height) - rowHeigthSum
I'm using vb.net 2022... what I want to do here is to change the height of the last row to fit the height of the DataGridView.
but not work, like the image below, but still like the image above.
note : DataListInfo1.Rows.Count = 4
lr = 2
rowHeghtSum = 87... DataListInfo1.Rows(0).Heght = 29... DataListInfo1.Rows(1).Heght = 29... DataListInfo1.Rows(2).Heght = 29...
last row in DataGridViw (DataListInfo1.Rows(3).Heght = 17)
DataGridViw Heght (DataListInfo1.Heght = 215)
need to change height of last row in DataGridViw => DataListInfo1.Rows(3).Heght from 17 to 128 to fit to bottom of DataGridViw but the last row height still in 17..


