HI
I am using telerik mvc grid with ajax binding
<%Html.Telerik().Grid<UserManagement.Models.setupEmployee>()
.Name("setupEmployees")
.DataBinding(dataBinding => dataBinding
//Ajax binding
.Ajax()
//The action method which will return JSON
.Select("_AjaxBindingEmployee", "UM")
).
Columns(colums =>
{
colums.Bound(o => o.EmployeeName).Title("Name");
colums.Bound(o => o.setupDesignation.Title).Title("Designation");
colums.Bound(o => o.Gender);
colums.Bound(o => o.DOB);
colums.Bound(o => o.EmployeeID).Format(
%><%Html.ActionLink("Edit", "Edit", new { Id = "{0}" }).ToString()).Encoded(false);
})
.Pageable()
.Sortable()
.Filterable()
.PrefixUrlParameters(false)
.Render();
%>
when i try to populate the grid with
return db.setupEmployees
i get the following error
A circular reference was detected while serializing an object of type. As i have relationship of this table with other tables. To avoid this i may have two options either i use viewmodel or disable the relationships which is not possible. Any other sugession from your side
Regards