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

[Solved] Grid editing with popup and foreign keys

0 Answers 35 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.
kempen marais
Top achievements
Rank 1
kempen marais asked on 19 Oct 2011, 09:01 PM
My question involves
a) MVC - razor syntax
b) Telerik's grid
c) AJAX editing using a popup ( not inline....)
d) foreign key relationships

Let's say I have a table "Person" with fields ID, Name, Surname, TitleID
and a table "Title" with fields ID, Title   (Person.TitleID is a Foreign key on Title.ID)

So my question is simple.... in the grid I want to display Name, Surname and Title  eg
John, Doe, Mr
Jane, Doe, Mrs

If you click add or edit, the popup must have space to edit the Name, Surname and select the title from a combo box populated from the Title table. ( in the case of edit, the combo selected item should be the current title.)

For the life of me I cannot get this right after almost 2 full days of struggle.... Either the TitleID shows in the grid, or the TitleID shows in the popup. I cannot get it right...and I have followed every tutorial, blog, sample etc out there. No one explains this scenario and it should be really simple. How hard can it be?  The problem probably lies with me and it's not in a sample because it's so trivial, but can someone please put together a working sample that I can download and study, because I'm about to give up. I thought MVC was supposed to make life easier, but I'm not sure any more.

I have not attached code because I have almost 10 versions already - all different and non working. Grin.
Thanks in advance.
Tags
Grid
Asked by
kempen marais
Top achievements
Rank 1
Share this question
or