This question is locked. New answers and comments are not allowed.
Hi
I want to know more about foreign key data binding.
Let me give you example
Imagine that you have two tables Customer and Order. In Order table I have CustomerId as foreignkey which points to primary key in the customer table.
Now I am developing a new order form in which I want to give Customers DropDownList
If I go for standard MVC helper I am able to get the CustomerId value in the Action method (Create). But when I used Telerik extension though the data gets binded in the dropdownlist but on submit I am not getting value of the customer id
If I use Telerik DropDownlistfor then I am not able to bind the dropdown
If i use standard helper method of Mvc then everything works as expected and I can save the record in the table
Please advise if I am doing something wrong.
Thanks
I want to know more about foreign key data binding.
Let me give you example
Imagine that you have two tables Customer and Order. In Order table I have CustomerId as foreignkey which points to primary key in the customer table.
Now I am developing a new order form in which I want to give Customers DropDownList
If I go for standard MVC helper I am able to get the CustomerId value in the Action method (Create). But when I used Telerik extension though the data gets binded in the dropdownlist but on submit I am not getting value of the customer id
@Html.Telerik().DropDownList().Name("Customers").BindTo(new SelectList(ViewBag.Cats,"Id","Description"))@Html.Telerik().DropDownListFor(model=>model.CustId)@Html.DropDownListFor(model => model.CatId, ViewBag.Cats as SelectList)Please advise if I am doing something wrong.
Thanks