Hi,
I have a datagrid that I add/remove rows on the client side and save the results into a database by using following code:
I have a datagrid that I add/remove rows on the client side and save the results into a database by using following code:
| foreach (GridDataItem item in RadGrid1.Items) |
| { |
| int PrincipalID = Convert.ToInt32(item["PrincipalID"].Text); |
| TextBox box = item.FindControl("txtShare") as TextBox; |
| Share = Convert.ToDecimal(((TextBox)box).Text); |
| InsertShareIntoDB(PrincipalID, Share); |
| } |
Adding new rows and updating Share column works fine. What I can't figure out is deleting rows. I am using GridClientDeleteColumn, so when I click on it, the row disappears, as it should. Now on postback, I want to insert into the database only visible (not deleted) rows, but the code above goes through all the rows, even the ones deleted. How can I check on the server-side if a row was deleted?
Thanks,
Julia