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

ListView contains ListView contains Grid

1 Answer 97 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Jie Lin
Top achievements
Rank 1
Jie Lin asked on 31 Oct 2013, 09:16 PM
In my implementation, I have a Kendo ListView contains another inner ListView. Each item in the inner ListView is an editable Kendo Grid. So, it is ListView->ListView->Grid relationship. The data binding works and view looks good initially.

But our requirement is to allow user to add new Grid (new item) inside the inner ListView by clicking a button, so I assigned an editable template to the inner ListView (by doing .Editable(editable => editable.TemplateName("SomeEditorTemplate"))). But it didn't work, it throws "invalid template" exception. I found that if the item inside the inner ListView is a TextBox instead of a Grid, then it works.

So, my questions is:
Does Kendo ListView support this kind of scenario (ListView contains ListView contains Grid)? If so, how can I add a new Grid item inside the inner ListView? I will appreciate if you can post a sample project or sample code.

Thanks!

Jie

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 04 Nov 2013, 11:35 AM
Hello Jie,

I already posted the following answer in the support ticket that you opened on the same subject.

----------------------------------------------------------------------------------------------

Basically it should be possible to achieve as deeper nesting as you want, no matter what kind if widgets you use. The only important thing to follow is to keep the template valid, in other words all the sharp symbols ( # ) that are not part of the template syntax should be escaped with a backslash and this is usually done automatically if you use the ToClientTemplate extension (which should be available for all widgets).

Give a try and let us know your findings.

Also do not forget to share the complete view (all the widgets and events attached to them) and the whole invalid template exception, so we can advise you more precisely.


----------------------------------------------------------------------------------------------


Feel free to continue our conversation here or in the other support ticket.

Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView
Asked by
Jie Lin
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or