Hello,
i've searchd for a way to add new items to a exsisitng ListView without reading the DataSoucre again.
I want to add one or more complete filled items to the exisiting ListView that have a DataSource the question is how should i do that?
Sample-Code:
If i use after the initialisation of the ListView the follwoing Code it will work but i need a way to add these items withoud rebinding the DataSource.
Your help would be very welcome!
i've searchd for a way to add new items to a exsisitng ListView without reading the DataSoucre again.
I want to add one or more complete filled items to the exisiting ListView that have a DataSource the question is how should i do that?
Sample-Code:
var objectListDataSource = new kendo.data.DataSource( { transport: { read: function ( options ) { $.ajax( { url: '/default/GetUsers', type: 'POST', dataType: 'json', data: { ids: ids }, traditional: true, success: function ( data ) { options.success( data ); } } ); } }, schema: { data: 'items', model: { id: 'ID', fields: { ID: { type: "Number", editable: false, nullable: false, validation: { required: false} }, UserName: "UserName" } } } } ); $( '#objectList' ).kendoListView( { dataSource: objectListDataSource, template: '<li>${ DisplayName }<div class="separator">|</div></li>', selectable: 'single', change: function () { //alert( "CHANGE" ); }, dataBound: function () { //alert( "dataBound" ); } } );var myDS = $( '#objectList' ).data( "kendoListView" ).dataSource;ids.push( 50 );ids.push( 45 );myDS .read();Your help would be very welcome!