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
565
handler for XamNumericEditor in one column is not being invoked
posted

I have a DataGrid with one column that is numeric and editable.  I have a handler set on XamNumericEditor.EditModeModeStarting, but I must not be doing it correctly, because my event handler is not being invoked.

The intention here is that whenever the user clicks to edit the field, the field is first set to the current value of another constantly-updating field (a stock price), which the user an then edit further if they wish.

Here's the XAML for the column.  Can someone point out where I'm going wrong?  Much appreciated.

 

    <igDP:Field Name="LimitPrice" Label="Limit Price">
        <igDP:Field.Settings>
            <igDP:FieldSettings AllowEdit="True">
                <igDP:FieldSettings.CellValuePresenterStyle>
                    <Style TargetType="{x:Type igDP:CellValuePresenter}">
                        <EventSetter Event="igEditors:XamNumericEditor.EditModeStarting" Handler="limitPrice_OnEditModeStarting"/>
                    </Style>
                </igDP:FieldSettings.CellValuePresenterStyle>
                <igDP:FieldSettings.EditorStyle>
                    <!-- (only cosmetic effects here) -->
                    <Style TargetType="{x:Type igEditors:XamNumericEditor}">
                        <Setter Property="Background" Value="{StaticResource editable}"/>
                        <Setter Property="Mask" Value="{StaticResource NoDollarSignMask}"/>
                    </Style>
                </igDP:FieldSettings.EditorStyle>
            </igDP:FieldSettings>
        </igDP:Field.Settings>
    </igDP:Field>