Welcome to the Xceed Community | Help
Community Search  
More Search Options

Problem with validation using CellValidationRule - old value problem

Sort Posts: Previous Next
  •  08-24-2010, 5:32 AM Post no. 28058

    Problem with validation using CellValidationRule - old value problem

    Hi fellow developers,

    I have a problem that i cannot seem to solve and need an advice.

    The problem is that when a cell value is changed (and cell focus is lost), the old value of the cell is passed to Validate method. Consequently, it is needed to click few more times in order to pass the new value to the validate method.

    Do you have any suggestion how to solve this or at least an explanation why this could happen?

    The relevant code snippet follows:

     

    <xcdg:DataGridControl x:Name="_contentGrid" Width="{Binding ElementName=containerDockPanel, Path=ActualWidth}" ItemsSource="{Binding Source={StaticResource collectionViewSource}}" CellEditorDisplayConditions="RowIsCurrent">

                ...

                <xcdg:DataGridControl.Columns>

                   <xcdg:Column FieldName="lT" Title="Lt" CellContentTemplateSelector="{StaticResource attributeValueDataTemplateSelector}">

                        <xcdg:Column.CellValidationRules>

                            <Spannweite:SpannweiteLtValidationRule/>

                        </xcdg:Column.CellValidationRules>

                    </xcdg:Column>

                    ...

                </xcdg:DataGridControl.Columns>

    </xcdg:DataGridControl> 

     

    Any help is appreciated.

    Regards,

    Dušan 

  •  08-24-2010, 7:43 AM Post no. 28060 in reply to 28058

    Re: Problem with validation using CellValidationRule - old value problem

    Perhaps because you're using "RowIsCurrent" editing, the editEnded event doesn't fire until you switch to a new row. Try changing it to CellIsCurrent?

    Alain
  •  08-25-2010, 5:09 AM Post no. 28074 in reply to 28060

    Re: Problem with validation using CellValidationRule - old value problem

    Thanks for your reply Alan.

    Unfortunately this didn't solve the problem. As I can see this property only defines the conditions when cell the editor is shown.

     

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.