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

Datakey Datetime issue

0 Answers 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
martonx
Top achievements
Rank 1
martonx asked on 03 May 2012, 12:07 PM
Hi All,

I found a bug in the Telerik MVC Grid. I'm using Ajax binding grid, with inline editing. My datakeys are:

        .DataKeys(keys => keys.Add(o => o.EntityKey).RouteKey("EntityKey"))

where EntityKey is a string and a Datetime composite key.
So when I hit the save changes button the [Bind(Prefix = "updated")]IEnumerable<T> updatedEtorls has a modelsate error, because of the second part of the key (the datetime part) is missing.
Here it is the sended data from Chrome developer tool:
  1. updated[0].EntityKey.EntitySetName: T
  2. updated[0].EntityKey.EntityContainerName:
    KHREntities
  3. updated[0].EntityKey.EntityKeyValues[0][Key]: KEYPART1
  4. updated[0].EntityKey.EntityKeyValues[0][Value]:
     
    keyvalue
  5. updated[0].EntityKey.EntityKeyValues[1][Key]: KEYPART2
  6. updated[0].EntityKey.IsTemporary:
    false
But in the grid, in the model there is KEYPART2 value. Somehow the AJAX call negotiate the datetime value.
Here it is my view column binding:
columns.Bound(o => o.KEYPART2).Title("Key part 2").Format("{0:yyyy.MM.dd}").ReadOnly();

Please advice,
Lajos Marton
Tags
Grid
Asked by
martonx
Top achievements
Rank 1
Share this question
or