hi all,
I want to delete rows from a mshflexgrid.
I am using mshflexgrid1.removeitem, It acts fine but after deleting a row the mshflexgrid.rows does not decreases by 1 for a deleting row.
Thanks for any suggestions to deleting entire row with row count.
regards sahu
Let me explain it briefly.
procedure for add items to mshflexgrid acts properly for entry
procedure for remove items to mshflexgrid also deletes the row required
The problem is that when we delete a single row after that if i inserts a row it does not works for once then ok and the row number in first cell increases to 2. These r my 2 procedures
private sub cmdinsert_click()
GrdPurchage.Rows = GrdPurchage.Rows + 1
GrdPurchage.TextMatrix(GrdPurchage.Rows - 1, 0) = GrdPurchage.Rows - 1
GrdPurchage.TextMatrix(GrdPurchage.Rows - 1, 1) = buyer
GrdPurchage.TextMatrix(GrdPurchage.Rows - 1, 2) = seller
GrdPurchage.TextMatrix(GrdPurchage.Rows - 1, 3) = storage
GrdPurchage.TextMatrix(GrdPurchage.Rows - 1, 4) = Item
GrdPurchage.TextMatrix(GrdPurchage.Rows - 1, 5) = txtqty.Text
end sub
Private Sub cmddelete_Click()
If rownum > 0 Then
Debug.Print GrdPurchage.Rows
GrdPurchage.RemoveItem (rownum)
DoEvents
Debug.Print GrdPurchage.Rows
end sub
plz help me, other suggestions would be welcome