vb中,mshflexgrid如何显示最后一行。

2024-12-30 17:22:00
推荐回答(3个)
回答1:

Private Sub vsflexgrid1_afterScroll(ByVal oldTopRow As Long, ByVal oldLeftCol As Long, ByVal NewTopRow As Long, ByVal NewLeftCol As Long)Dim restdata As New adodb.Recordset
if restdata.RecordCount >10 then '当总行数大于10时
If NewTopRow <> oldTopRow Then
Me.vsflexgrid2.TopRow = NewTopRow - 1
End Ifend if
End Sub

回答2:

代码如下:
MSHFlexGrid1.TopRow = MSHFlexGrid1.Rows - 1

回答3:

mshflexgrid1.row=mshflexgrid1.rows-1
mshflexgrid1.toprow=mshflexgrid1.row