如何选择meshflexgrid中多行数据并将选择的数据进行收藏?
选择多行后单击右键出现收藏按钮,同时选择的数据高亮显示,点击收藏后希望能将选择的数据放入数据库中收藏表中,最主要就是选择数据后如何将数据写回数据库中,哪位大哥帮帮我下吧!!!
[解决办法]
Private Sub MSHFlexGrid1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
HKSH = Trim(Str(MSHFlexGrid1.RowSel))
End Sub
Private Sub MSHFlexGrid1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
HJSH = Trim(Str(MSHFlexGrid1.RowSel))
If Trim(HKSH) <> Trim(HJSH) Then
HKSH = Val(MSHFlexGrid1.TextMatrix(HKSH, 1))
HJSH = Val(MSHFlexGrid1.TextMatrix(HJSH, 1))
End If
End Sub
看看这两个过程就明白了