Validation problem

4 posts, 1 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 16 May 2013 Link to this post

    Hi,

    I have a MVVM application which showed a strange behavior.
    To reproduce it I "switched to event mode" which has:

    <telerik:RadGridView Grid.Row="1" ItemsSource="{Binding Bearings}" AutoGenerateColumns="False" ShowInsertRow="True" ShowGroupPanel="False" RowValidating="RadGridView_RowValidating" CanUserDeleteRows="True" CanUserInsertRows="True">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn  Header="Ordnungszahl" Width="*" DataMemberBinding="{Binding Ordnungszahl}" IsFilterable="True" SortMemberPath="Ordnungszahl" IsSortable="True" />
                <telerik:GridViewDataColumn Header="BauartenCode" DataMemberBinding="{Binding BauartenCode}" Width="120" IsFilterable="False" IsSortable="True" />
                <telerik:GridViewDataColumn Header="AussenDMCode" DataMemberBinding="{Binding AussendurchmCode}" Width="120" IsFilterable="False" IsSortable="False" />
                <telerik:GridViewDataColumn Header="Stufe" DataMemberBinding="{Binding Stufe}" Width="120" IsFilterable="False" IsSortable="False"  />
                <telerik:GridViewDataColumn Header="Unterstufe" DataMemberBinding="{Binding Unterstufe}" Width="120" IsFilterable="False" IsSortable="False"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

    In code behind I do nothing more than:

    private void RadGridView_RowValidating(object sender, Telerik.Windows.Controls.GridViewRowValidatingEventArgs e) {
            e.IsValid = false;
        }


    When I hit ESC twice - editing is ended and the "old values" are displayed - but the row still displays "invalid" (red exclamation mark, red background).

    What I expect is that the row becomes valid since it has the original (valid) values after "CancelEdit" (Hitting ESC twice).

    The second problem (in debug) I get a "ArgumentNullException" (Parameter instance must not be null) when I add a row without entering anything hit ESC twice.

    Manfred
  2. Answer
    Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 20 May 2013 Link to this post

    Hi Manfred,

    Thank you for the feedback.

    The first problem, with validated item, is already fixed. Please download our latest internal build.

    As to the second problem related to the new row, we will investigate it further.
     
    Kind regards,
    Yordanka
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 20 May 2013 Link to this post

    Thank you Yordanka,

    I just gave it a try - Validation works like expected now.
    About the other "Problem" - it's just a caught exception which Shows up in debug mode.

    Regards
    Manfred
  5. Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 22 May 2013 Link to this post

    Hi Manfred,

    We will resolve the exception and the fix for it will be part of the next internal build on Monday.
     
    Regards,
    Yordanka
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top