DropDownList in Popup Editor Issues

1 Answer 20 Views
DropDownList General Discussions Grid
Abdulsalam Elsharif
Top achievements
Rank 2
Iron
Iron
Abdulsalam Elsharif asked on 06 Sep 2021, 09:45 AM | edited on 06 Sep 2021, 09:52 AM

Hello 

I used Telerik UI for ASP.NET MVC Grid to perform CRUD operations and manipulate its data in Popup mode. I create a template to customize the Popup window .. Until now every things works fine except the binding in the drop down list .. I followed exactly this demo but unfortunately the drop down list won't to populate. 

Also, When I want to used a foreignkey column in Grid as below, I got "Value can not be null" error :(

columns.ForeignKey(p => p.category_id, ds => ds.Read(r => r.Action("GetCategories", "Home")), "id", "name").Title("Category");

I attached sample project having the issue.

Any Help Please

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 09 Sep 2021, 09:08 AM

Hi Abdulsalam,

 

Thank you for writing to us.

There is a database related issue with the dropdown read call:


This usually is due to the hierarchical structure of your data classes not being able to serialize properly due to circular looping problem. You can find more info on that over the net:
https://stackoverflow.com/questions/1153385/a-circular-reference-was-detected-while-serializing-an-object-of-type-subsonic

Once the data issue is resolved, I think that the dropdown problem will be fixed as well.

Also, as helpful samples, I suggest that you check these:
- https://demos.telerik.com/aspnet-mvc/grid/editing-custom
- https://demos.telerik.com/aspnet-mvc/grid/foreignkeycolumn

In addition, we have very helpful ForeignKey column and DropDownList editing samples here:
https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid

I hope this information will prove helpful. Let me know if I can be of further assistance.

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
DropDownList General Discussions Grid
Asked by
Abdulsalam Elsharif
Top achievements
Rank 2
Iron
Iron
Answers by
Eyup
Telerik team
Share this question
or