我的數據listview網格結構是這樣的。如何在數據源中爲listview設置數據項kendo ui
<div id="listView">
<div class="product"><h3>India</h3></div>
<div class="product1"><h3>Gujarat</h3></div>
<div class="product"><h3>Surat</h3></div>
</div>
我想設置新的數據,其中數據源有類product1。
ex。像
<div class="product1"><h3>Gujarat</h3></div>
我想更改古吉拉特邦的其他名稱。
我在下面的代碼中使用,但這隻設置第一個元素,而不是檢查特定的類。
var firstItem = $('#listView').data().kendoListView.dataSource.data()[0];
firstItem.set('name','The updated Name');
如果您知道,那麼請回復解決方案。
如何初始化樹視圖? – OnaBai