I need code that will delete the line highlighted by a user in a MSFlexGrid.
I've tried :
MSFlexGrid1.removeItem
But the program is looking for an index number.
Printable View
I need code that will delete the line highlighted by a user in a MSFlexGrid.
I've tried :
MSFlexGrid1.removeItem
But the program is looking for an index number.
VB Code:
With myGrid If (.Row = .RowSel) Then .RemoveItem (.Row) Else MsgBox "You can only remove one record at a time!", _ vbInformation, _ "Delete" End If End With
This allows 1 row to be deleted
Guess my code didn't work.:rolleyes:
Yes the code works ... in the sence that the row is removed from the Grid, but doesn't delete it from the database.
How do I delete it from the data source aswell???
Choice 1 : In code using ADO where you got the data from in the first place.
Choice 2 : Bind the grid to the data. (bad idea)
How do I do this? :confused:
Quote:
Choice 1 : In code using ADO where you got the data from in the first place.