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
How to get UnboundColumn to show validation error when the input is invalid
posted

 

                        <igGrid:UnboundColumn Key="UNBOUND" ValueConverter="{StaticResource ConvertValue}">
                            <igGrid:UnboundColumn.EditorTemplate>
                                <DataTemplate>
                                    <TextBox Text="{Binding RowData.Value, Mode=TwoWay}"/>
                                </DataTemplate>
                            </igGrid:UnboundColumn.EditorTemplate>
                        </igGrid:UnboundColumn>

 

Above is my column definition. The Value's type is Decimal. If I enter some garbage in the text box, such as "ASdf" I expect to see some validation error. The error is shown for a TextColumn.

I am using a ValueConvertor because the displayed value is dependent on the value in a different column.

Parents
No Data
Reply
  • 6475
    Verified Answer
    posted

    Hi,

    You should enable validation on your editor binding:

     

    <DataTemplate>
        <TextBox Text="{Binding RowData.Value, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}"/>
    </DataTemplate>
    
    

     

     Hope this helps,

Children