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

'new' k-listview-content container problem

2 Answers 99 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Adrien
Top achievements
Rank 1
Adrien asked on 24 Feb 2021, 08:40 AM

Hello.

We have just updated kendo to it's lastest version and one of our components is completely broken due to this container.

Is there any posibility to prevent the generation of this container ?

I've searched about this and found this post about the ContentElement but if we add this the source data-bind is not working at all.

GitHub issue: https://github.com/telerik/kendo-ui-core/issues/5772

Not working example:

<div id="sortableDropArea" data-role="listview" data-template="draggableElement" data-bind="source: listOfItems, contentElement: ' '"></div>

 

Example of our current code:

Main container:

<div class="">
    <div id="sortableDropArea" data-role="listview" data-template="draggableElement" data-bind="source: listOfItems"></div>
</div>

Child template:

<script type="text/x-kendo-tmpl" id="draggableElement">
    <li class="list-group-item" fieldId="#: items.itemId#">
        <span class='itemNameText'>
            #: items.itemName#
        </span>
    </li>
</script>

2 Answers, 1 is accepted

Sort by
0
Adrien
Top achievements
Rank 1
answered on 24 Feb 2021, 08:43 AM

Since I'm unable to edit the code. Here is an example of the current code genrated on the UI.

 

<div id="draggableContainer" class="k-widget k-listview k-listview-bordered" data-role="listview" data-template="draggableElement" data-bind="source: listOfItems" role="list">
    <div class="k-listview-content">
        <li class="list-group-item" data-uid="2c3cd29a-1ce1-44c1-81d0-a7b19801de99" role="listitem">
            <span class="itemNameText">
                Item Name 1
            </span>
        </li>
 
        <li class="list-group-item" data-uid="802b4568-4524-4fac-8246-785fa5919378" role="listitem">
            <span class="itemNameText">
                Item Name 2
            </span>
        </li>
    </div>
</div>
0
Accepted
Georgi Denchev
Telerik team
answered on 26 Feb 2021, 04:21 PM

Hi Adrien,

Thank you for the provided snippets.

The widget options are set through the data- syntax. More information can be found in the following section of the Documentation.

<div id="sortableDropArea" data-role="listview" data-content-element="" data-template="draggableElement" data-bind="source: listOfItems">

Let me know if you have any questions.

Best Regards,
Georgi Denchev
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
ListView
Asked by
Adrien
Top achievements
Rank 1
Answers by
Adrien
Top achievements
Rank 1
Georgi Denchev
Telerik team
Share this question
or