views:

19

answers:

0

Hi, I have a RadGrid that was working fine. I then added a CustomValidator which contains a LINQ. Now when you update the updates aren't shown immediately, the old data is there. You have to do a Refresh for the updated data to come through. I narrowed the problem down to a LINQ query in the CustomValidator. It goes something like this:

DB.Cars.Where(c => c.Id == id).First();

If I comment out this code everything is fine. I tried other LINQ queries in the CustomValidator and they worked fine. It seems to only be a problem when I'm querying the primary key. Also I think it is only a problem with the First there. Maybe because that is when it is forced to actually get the data.

Anyone else experience this, know how to deal with it?

Thanks!