Stelio Macumbe
unread,Mar 21, 2013, 10:57:16 AM3/21/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mybatis...@googlegroups.com
Hi,
I have a form with a GridView (bound to a list of POCOs), a delete row button and a save button. The delete button only removes the items from the gridview (through gridview.DeleteRow()), the save button would then remove,update or add the actual rows from the database. The problem is when items are removed from the gridView they are also removed from the underlying data source.
Given that I am not a very good programmer, I am curious to know how would smarter programmers accomplish this ?
I considered
a) Adding a RowStatus flag to each POCO, it would let me know if the row was meant to be added , updated or deleted ? But how would I hide the deleted rows from the gridView ?
b) Creating a list for removed items , before an item is removed from the view I could copy it to a "removed items list" ?
Any ideas would be really appreciated
Best Regards,
Alex