This is a migrated thread and some comments may be shown as answers.

Validation problem

3 Answers 76 Views
GridView
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 16 May 2013, 07:38 PM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Yordanka
Telerik team
answered on 20 May 2013, 02:22 PM
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.

0
ManniAT
Top achievements
Rank 2
answered on 20 May 2013, 07:33 PM
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
0
Yordanka
Telerik team
answered on 22 May 2013, 01:19 PM
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.

Tags
GridView
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Yordanka
Telerik team
ManniAT
Top achievements
Rank 2
Share this question
or