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

Bug: Canceling cell editing when it is not valid

4 Answers 39 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Konrad Sikorski
Top achievements
Rank 1
Konrad Sikorski asked on 01 Jun 2011, 01:23 PM

When user is trying edit cell, and set wrong value and try to commit by pressing enter than validation information will be shown and this is ok. But next he wants to cancel changes and press esc to exit cell edit mode, and once more escape to exit row edit mode. In this moment no error are shown but cell has wrong data.

Could you give me any workaround? Thank You.

4 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 01 Jun 2011, 05:15 PM
Hello Konrad,

I have tried to reproduce the issue you reported, but I was not able to. May you take a look at the sample attached to verify whether I am missing something ?
I have tested the scenario by inserting a string value in the last - numeric column. However, pressing Esc button does convert the value back to the original - correct one.

Best wishes,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Konrad Sikorski
Top achievements
Rank 1
answered on 02 Jun 2011, 10:30 AM

Hi,

Your example is working almost correct. The "almost" is that the tool tip is showing validation message after I have canceled editing. But your example doesn't introduce "custom" validation. In my case I am using System.ComponentModel.DataAnnotations. This is my code:

public partial class MainPage : UserControl
{
    public MainPage()
    {
        InitializeComponent();
  
        ucGrid.ItemsSource = new ObservableCollection<Person>
                      {
                          new Person{Name="N1", Age=1},
                          new Person{Name="N2", Age=2},
                          new Person{Name="N3", Age=3}
                      };
    }
}
  
public class Person
{
    [Required]
    public string Name { get; set; }
    public int Age { get; set; }
}

<UserControl x:Class="testTelerikRadGridEsc.MainPage"
    xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
    Height="300" Width="400">
  
    <Controls:RadGridView x:Name="ucGrid" />
</UserControl>

0
Konrad Sikorski
Top achievements
Rank 1
answered on 07 Jun 2011, 12:18 PM
Any solution?
0
Maya
Telerik team
answered on 07 Jun 2011, 01:24 PM
Hello Konrad Sikorski,

We have discovered the cause of the problem and it has already been resolved. So, now neither when having an custom error message (like with the case of [Required] annotation), nor when having a format validation failed (when introducing string value in integer field) will be displayed once that error is corrected. The fix will be available in our Latest Internal Build coming next week.
Please accept my apology for any inconvenience caused. 

Best wishes,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Konrad Sikorski
Top achievements
Rank 1
Answers by
Maya
Telerik team
Konrad Sikorski
Top achievements
Rank 1
Share this question
or