Welcome to the Xceed Community | Help
Community Search  
More Search Options

EndEdit again (maybe)

Sort Posts: Previous Next
  •  09-23-2010, 1:57 PM Post no. 28797

    EndEdit again (maybe)

    DataGrid WPF Version 3.7.10175.16000

    I am having the following problem, which appears to be similar to a problem that others have had and for which I have tried their solutions without success.

    I have a DataGrid on a page, where the user is in editmode in a cell. They change the value to a bad value, then press a button on the page to SAVE. This causes our custom EndEdit method to be called thereby committing the value to the underlying datastore, and also validates the bad value, returning an error. Now the endedit has been called and the focus was last set to the SAVE button. So the user dutifully clicks back into the cell they were editing to enter a proper value. However, at this point the cell does not enter editmode. There is no cursor in the cell although it appears to be highlighted. The user must then click out of this cell to another cell in the grid, and then click back into the original cell. At this point the cell will properly be in editmode.

    I have thought that this problem is that when the SAVE button is pressed, that somehow the existing editmode was not terminated. So when the user clicks into the cell after the button press, the datagrid control still thinks it is in editmode and so it does not start edition. I have tried every possible method to force the full endedit, including ending edit on the grid, on the row, and on the cell. I have used an invoker at various priorities to cause either the endedit or the save/validation to be delayed. I have tried setting the current row to the end and the to the beginning. Nothing works.

    If this scenario makes sense maybe someone can suggest what I might do. Perhaps I am looking at this problem the wrong way and the problem is not that endedit did not get called properly. Maybe instead it is just that the cell focus did not change on the button press and the datagrid will only enter edition when focus is first set on a cell.

    Thanks.

    Marty

  •  09-28-2010, 1:28 PM Post no. 28866 in reply to 28797

    Re: EndEdit again (maybe)

    Hi Marty,

    Without seeing the issue in action it will be difficult to pinpoint exactly what is going, especially since you already seemed to have tried the usual suspects. Would it be possible for you to send me an application that reproduces the behavior? Send it to the priority-support email to my attention.

     


    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  10-12-2010, 3:53 PM Post no. 28955 in reply to 28866

    Re: EndEdit again (maybe)

    OK I will make up a sample. I am several problems related to this - where edition doesn't start when you expect it should. So far I believe it has something to do with - using AutoSelectTextBox and NOT turning on AutoCreateColumns and the data in the cell is NULL.

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.