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

Validation two times in gridview

1 Answer 67 Views
GridView
This is a migrated thread and some comments may be shown as answers.
minh NGO
Top achievements
Rank 1
minh NGO asked on 24 Mar 2010, 08:38 AM
Hi,

I'm using the rad controls Q1 2010 (the lasted version) for Silverlight 3.

I have a GridView1 and I have a row validation for this gridview in code-behind

void GridView1_RowValidating(object sender, GridViewRowValidatingEventArgs e) 
    foreach (GridViewCell g in e.NewValues) 
    { 
        if (string.IsNullOrEmpty(g.Value.ToString())) 
        { 
            if (MessageBox.Show("Do you want to continue?""", MessageBoxButton.OKCancel) == MessageBoxResult.OK) 
            {                        
                e.IsValid = false
            } 
            else 
            { 
                e.IsValid = true
            } 
            break
        } 
    } 

When user adds a new row into GridView1, once the row loses focus the validation is executed and the message is appeared. But this message is displayed two times if user clicks on a different row in this gridview instead of clicking anywhere else (to lose focus) then clicks on OK in the displayed message. It means that the validation is executed two times.

I don't have that problem when using Telerik Q3 2009.

Do you have any idea?

Minh.

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 29 Mar 2010, 03:05 PM
Hello minh NGO,

Thank you for pointing this out. Indeed you've hit a very weird issue in our control. The issue is already fixed and will be available with the next latest internal build (next Friday). I've added 1000 Telerik points to your account.

Best wishes,
Nedyalko Nikolov
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
minh NGO
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or