Home Forums WPF controls Xceed DataGrid for WPF DataRow.EndEdit on each row change?????

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #26888 |

    Hi,

    I am currently a little frustrated/confused….[*-)]

    I have inherited a new class from DataRow to override BeginEdit and EndEdit to inject my own code.

    But EndEdit will be called every time I change a row in the DataGridControl!!!

    BeginEdit is only called when a row changes to edition mode. That’s ok.

    Is there ANY way to distinguish between a real EndEdit and a call to EndEdit triggered

    by a simpel row change?

    Why do you call EndEdit on every row change?

     

    Michael

    Imported from legacy forums. Posted by Michael (had 877 views)

    Xceed Support
    Member
    Post count: 5658

    EndEdit() is effectively systematically called. This was done like that as a systematic way to ensure edition were commited when navigating from row to row.

    Current implementation of EndEdit() verifies before executing anything is the row is indeed currently in edition. You could achieve the same result using a snippet like this one:

    public override void EndEdit()
    {
       base.EndEdit();

       if( this.IsBeingEdited == true )
       {
           //Do my stuff here
       }
    }

     

    Imported from legacy forums. Posted by Marcus [Xceed] (had 2289 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.