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

Is it possible to use Kendo MVC Listview with complex objects

1 Answer 69 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Andreas Laffer
Top achievements
Rank 2
Andreas Laffer asked on 02 Nov 2015, 12:32 PM

Hi ! Im searching for a solution of my problem. Ich have a simple table named job with foreign keys from category and customer. I woultd like to edit this structure by using a listvew. My template is looking like:

<script type="text/x-kendo-tmpl" id="jobtemplate">
    <div class="job-view k-widget">
        <div class="edit-buttons">
            <a class="k-button k-button-icontext k-edit-button" href="\\#"><span class="k-icon k-edit"></span></a>
            <a class="k-button k-button-icontext k-delete-button" href="\\#"><span class="k-icon k-delete"></span></a>
        </div>
        <dl>
            <dt>Info</dt>
            <dd>#:Info#</dd>
            <dt>Job-Category</dt>
            <dd>#:Category.Name#</dd>
            <dt>Customer</dt>
            <dd>#:Customer.Name#</dd>

.....

But when I click on  the "add new Job"- button I will get the javscript error "Uncaught ReferenceError: Category is not defined". When I'm using the grid this is able to work, but not in Listview. What I'm doing wrong?

best regards Andreas Laffer ​

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 04 Nov 2015, 07:20 AM
Hi Andreas,

This could happen in case there is no default value specified for the complex object field. If that is not the case I would ask you to share the ListView configuration and the editor template as well, so we can investigate further.

Regards,
Alexander Popov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ListView
Asked by
Andreas Laffer
Top achievements
Rank 2
Answers by
Alexander Popov
Telerik team
Share this question
or