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

Making default values in an insertion row become committed rather than cancelled

Sort Posts: Previous Next
  •  03-10-2010, 10:30 AM Post no. 26057

    Coffee [C] Making default values in an insertion row become committed rather than cancelled

    When a new item is initialised to certain default values in the CreatingNewItem event handler of a DataGridCollectionViewSource, if the user wishes to keep these default values and clicks away or presses enter to exit edit mode in an insertion row without changing any values, how do I allow the new item to be committed rather than cancelled?

    I have tried implementing InitializingNewItem and NewItemCreated in order to initialise the values in the hope that this will be seen as a change to the original item created in CreatingNewItem, but this doesn't work either.

    I have attached an example project demonstrating the issue.

    Any help greatly appreciated.

    Thanks,

    Jason


    Associate, .NET Development
    Morgan Stanley, UK
  •  03-12-2010, 4:00 PM Post no. 26095 in reply to 26057

    Re: Making default values in an insertion row become committed rather than cancelled

    Hi Jason,

    Seeing as this is the normal behavior, we tried to find a workaround. Normally it should be possible to use the EditBegun event to do the initialization of the default values, so that they look like new values and not the original ones. However we found a problem where that event is getting called twice and so it loses the effect we wanted to trigger with it. That problem will be fixed in the next release, meaning that in the meantime we unfortunately have no workaround to allow you to achieve the desired behavior.

     


    Diane Lafontaine
    Technical Support / Technical Support Team Lead
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.