Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
124
Using a NumericUpDown in the EditorTemplate doesn't save data
posted

Is it possible to use the Silverlight (System.Windows.Controls.Input.Toolkit) user control in the Grid? We are using 2011.1

 <inf:TemplateColumn.EditorTemplate>

    <DataTemplate>

        <Grid>

            <win_controls:NumericUpDown

                Width="95"

                Value="{Binding AgeOrAmountEtc, Mode=TwoWay}"

                VerticalAlignment="Center"

                DecimalPlaces="2"

                Style="{StaticResource Styles.NumericUpDown}"/>

        </Grid>

    </DataTemplate>

</inf:TemplateColumn.EditorTemplate>

 

 

The up/down buttons work OK but when you tab or click out of the field, the EndEdit method fires before the control has updated so the value reverts to the previous one.

  • 138253
    Offline posted

    Hello,

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I created a sample project for you using the code you have provided and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.

    Feel free to write me if you have further questions.

    XamGridNumericUpDown.zip