Home Forums WinForms controls Xceed Grid for WinForms InsertionRow.EditEnded and DataRowTemplate.EditEnded

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

    Could somebody please what is the reason why insertionRow.EditEnded also calls DataRow.EditEnded ?

    In my application, I am using the EditEnded event to update the database for the current row. My updating code is contained on both InsertionRow.EditEnded and DataRowTemplate.EditEnded events. While debugging my application I noticed that my updating code was being called twice causing performance issues.

    I wonder how many other application using the xceed grid have this behaviour as well. 

     

    is this true for EditBegun, EditCancelled, and EndingEdit events as well ?

    Imported from legacy forums. Posted by Graeme (had 1794 views)

    User (Old forums)
    Member
    Post count: 23064

    It is true for the other events as well, and the reason is that when the InsertionRow enters edition, it immediately creates a DataRow that is added to the grid, using the DataRowTemplate to generate it.  Therefore, if you have subscribed to these events on the DataRowTemplate, then the new DataRow will raise these events.  In your case, you most likely do not need to subscribe to these events on the InsertionRow.

    Imported from legacy forums. Posted by André (had 2226 views)

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