关于MSFlexGrid批量删除的问题.
Private Sub MSFlexGrid1_Click()
With MSFlexGrid1
If .TextMatrix(.RowSel, 1) <> " " And .TextMatrix(.RowSel, 2) <> " " Then
If .TextMatrix(.RowSel, 0) = "√ " Then
.TextMatrix(.RowSel, 0) = " "
ElseIf .TextMatrix(.RowSel, 0) = " " Then
.TextMatrix(.RowSel, 0) = "√ "
End If
Else
.TextMatrix(.RowSel, 0) = " "
End If
End With
End Sub
Private Sub cmddel_Click()
?
End Sub
单击所选行的第一列出现√或取消,单击删除按钮删除带√的行,cmddel事件该怎么写?
或有其它办法,大家各抒己见啊,谢谢!
------解决方案--------------------With MSHFlexGrid1
For i = .Rows - 1 To 1 Step -1
If .TextMatrix(i, 0) = "√ " Then
.RemoveItem i
End If
Next
End With