0
votes

In a Silverlight web app that I'm working on, there's a DataGrid with a column that displays as a DatePicker. The DatePicker gives the option to change its value by typing in the box, or by clicking on the calendar button and selecting the date. In the case where text is entered, if the cell loses focus then the entered value is lost and the old value is displayed. If text is entered and then the Enter key is pressed, then the value is kept when the cell loses focus.

Also curious is that other editable cells in this grid already keep their information without needing to first hit enter.

Is there a way to have the value kept without having to press the Enter key? There's obviously some sort of built-in event happening when the Enter key is pressed in order for this to work. Maybe I can use the LostFocus event to fire whatever the Enter key is using? What's going on here?

1

1 Answers

0
votes

You may want to try using the keydown event and trap all keystroke then flush the data to where this control was bound.