WPF Datagrid Cell - Edit, Update,Cancel

Hi All ,
Currently am working on wpf datagrid . In My project , i have a requirement for edit data in cells rows like asp.net editing ( edit, update , delete ) . I have placed three buttons in a column and made only edit visible . on clicking edit i made others two
visible and edit not visible . Evrything fine , but the thing is that when i am editing cells on the first click on cells i am able to edit the data but once when i try after leaving that cell and come again , the cell is becoming read - only . I dont understand
why this behaviour . pls help me in this .