Hi,
I want to call the PropertyChanged when the user typing in the Cell.
Right now it is called only when i tab out of the Cell.
Please advice me on this.
thanks
Ramesh Babu.
Hello Ramesh,
PropertyChanged is fired when the Cell exits EditMode. If you want this event to fire you can commit changes while typing. One option is to handle the KeyDown event, check if the XamDataGrid.ActiveCell != null and use a DataPresenterCommands.EndEditModeAndAcceptChanges and then start the edit mode right away. I am not sure if that is the best way to do this as I need more information about whay you are trying to achieve. Test this and let me know if it works in your scenario.Alex.
The user types in the Cell and they will click save from the menu.Since they didn't tab out the changes are not updated.
i got the same problem. I want the value of the property to be updated on typing, so that the value would be saved on clicking the save button in the toolbar.
Sure, handling events like KeyUp and then end EditMode could help, but in this case i have to manage things like the cursorposition etc. what is not more like a hack.
Is there no better way to force the update of the datasource on every ValueChanged, than updating on EndEditMode?
Best regards, Alex
By Default, the XamDataGrid updates when the Cell ends EditMode, unless you changed the UpdateMode property of the grid. These are the cases when tabbing out, changing focus, pressing Enter. You can still handle events like LostFocus or KeyDown,KeyUp,KeyPress and use DataPresenterCommands to end EditMode explicitly.
Alex.