Hi
I have this requirement, I want to avoid the message box popping every time the Date editor is input with
an Invalid Date, I have created a custom control and in that this is what i am trying to do
Private
Sub XamDateTimeEditor_EditModeValidationError(ByVal Sender As Object, ByVal e As Infragistics.Windows.Editors.Events.EditModeValidationErrorEventArgs)
Try
e.InvalidValueBehavior = Infragistics.Windows.Editors.InvalidValueBehavior.RevertValue
//e.Handled = True
Throw ex
End Try
End Sub
But since its a routed event i guess the Pop Up Still Shows,Then i added the second line
i.e. e.Handled = True, Now the popUp has gone but neither am i able to access the
EditModeValidationError Event in the page i am using the Custom Control since I have already
handled it,Now why do i want to handle it is beacause in some of the pages i want to show the error
in a label at the top of the Page.I tried creating Custom Events but throws a compile time error
while binding it in Xaml
<
igDP:FieldSettings EditorType="{x:Type TrackerControls:TrackerXamDateTimeEditor}">
Am i doing the right way or is there any other easier solution to it
Thanks in advance
Abhi
I'm not sure exactly what part you are asking for help on. The default value for the InvalidValueBehavior property of the EditModeValidationError event is based on the InvalidValueBehavior property of the value editor itself. If you were using the editor standalone then you would probably just set this property directly. Since it appears you are using this within the datapresenter, you could either set it on the FieldSettings->InvalidValueBehavior or you could set it in the setters of the EditorStyle on the editor itself.