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
2915
XamDataGrid - Regular expression setting
posted

Hi,

I have a XamDataGrid. Here is my Field Layout setting code.

<Style TargetType="igEditors:XamTextEditor" x:Key="paramNameStyle">
<Setter Property="ValueConstraint">
<Setter.Value>
<igEditors:ValueConstraint MaxLength="50"/>
</Setter.Value>
</Setter>
</Style>

<igDP:XamDataGrid.FieldLayouts>
                        <igDP:FieldLayout>
                            <igDP:FieldLayout.Fields>

                                <igDP:Field Name="Parameter_Name">
                                    <igDP:Field.Settings>
                                       <igDP:FieldSettings AllowEdit="True" EditorStyle="{StaticResource paramNameStyle}" />
                                    </igDP:Field.Settings>

                                </igDP:Field>
                                <igDP:Field Name="Data_Type">
                                    <igDP:Field.Settings>
                                        <igDP:FieldSettings  />
                                    </igDP:Field.Settings>
                                </igDP:Field>
                                <igDP:Field Name="Data_Double">
                                    <igDP:Field.Settings>
                                        <igDP:FieldSettings AllowEdit="True" />
                                    </igDP:Field.Settings>
                                </igDP:Field>
                            </igDP:FieldLayout.Fields>
                        </igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>

 

For the column "PARAMETER_NAME" I want to set regular expression so that it  accepts  everything apart from these values "><&;|%\n". I want to restrict these characters.

For the column "Data_Type I want to set regular expression so that it acceps only numbers and '-'  (regex [0-9-]  )

 For the column "Data_Double" I want to set regular expression so that it acceps only numbers and '-' and '.' (regex [0-9.-] )

How can I set this condition in my xaml for these  columns ?

 

Thanks

Arpita