DCSIMG
ADO.NET - Maor's Blog

Browse by Tags

Save datagrid changes in the database
Once you want edit a recore, add new or deleted a recored in your data grid you may want to save it in the database. How do we do it? Create UpdateCommand handler for the data grid Identify what DataGrid row was updated by getting the ItemIndex property of the row ( Item object) passed in the event object. Then use the index value to get the corresponding value out of the grid's DataKeys collection: string key = DataGrid1.DataKeys[e.Item.ItemIndex].ToString(); Get the changed values out of the DataGrid...

Search

Go

This Blog

News

    RSS

     

    Connect with Me

    Maor's Facebook profile  Follow Maor on Twitter  Maor's profile on Linkedin  Maor in FriendFeed 
           

Syndication