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

ForeignKey and Guid problem

2 Answers 164 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrzej
Top achievements
Rank 2
Andrzej asked on 23 Jul 2012, 02:33 PM
Hey

There is some error when I try use ForeignKeywith with Guid column.
(int) all works fine
columns.ForeignKey(c => c.MenuID, (System.Collections.IEnumerable)ViewData["Menus"], "MenuID", "MenuNazwa");


(Guid) its a error
columns.ForeignKey(c => c.UserId, (System.Collections.IEnumerable)ViewData["Users"], "UserId", "UserName");

Błąd: ReferenceError: UserId is not defined
Plik źródłowy: http://localhost:53048/Scripts/kendo.web.js
Wiersz: 347

Any ideas how fix this (change Guid to int is not a option)

Tx for help

PS. Whith old MVC extensions all works fine ...

2 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 24 Jul 2012, 06:51 AM
Hello Andrzej,

Could you please provide a bit more details about your scenario as I'm unable to observe such error locally. A small runnable sample will be appreciated.

Regards,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Andrzej
Top achievements
Rank 2
answered on 24 Jul 2012, 07:23 AM
Of course, why not. All the files you want to associate with the problem should be attached. The problem occurs with me anywhere in the project is to connect one-to-many relationship between tables where the key is not INT but Guid like User and roles with Microsoft Membership ... I hope that now everything is clear.
Tags
Grid
Asked by
Andrzej
Top achievements
Rank 2
Answers by
Rosen
Telerik team
Andrzej
Top achievements
Rank 2
Share this question
or