Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
How To Delete from a XamDataGrid
posted

Hi All

I was wondering how to create a button or simple way to allow a user to remove a row from my XamDataGrid and then allow me to remove the record from my corresponding database. I looked online but was somewhat confused and I would appreciate clarification. I imagine it should be a pretty simple thing.

Thanks in advance!

Mike

  • 69686
    posted

    Hello Mike,

    If you have bound your XamDataGrid to a DataBase, you should commit these changes manually. To remove records, you can use DataPresenterCommands like:

    xamDataGrid.ExecuteCommand(DataPresenterCommands.DeleteSelectedRecords); and commit the changes.

    More information on deleting records, you can find in this forum thread:

    http://community.infragistics.com/forums/p/26140/95953.aspx#95953

    Hope this helps.