We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to load a dynamic list item in the child page?

To load the dynamic list item in the child page externally, you can append the listview on demand in the child page of the list item. Refer to the following steps to achieve this.
Since the child list items have to be loaded on demand, you need to write the bind touch event for the list item that needs to be loaded dynamically. The following code example displays the same.

HTML


On touchstart event, you can initiate the required listview with remote databinding. For that, append the listview wrapper in the child list items and initiate the same in the obtrusive way as given in the following code.

<script>
// On touch start of the listview.

function touch(args) {

// DataManager creation.

window.datasource = ej.DataManager({

url: "http://mvc.syncfusion.com/Services/Northwnd.svc/"

});

window.dbitem = { "text": "ShipCity" };

//Creates the div tag with child listview ID.

var list = ej.buildTag('div#' + $(args.item).attr('data-childid') + "_list");

//Appends the children list under the div ID "child_container".

$('#' + $(args.item).attr('data-childid') + "_container").empty().append(list);

//Initializes the child list.

list.ejmListView({ dataSource: window.datasource, fieldSettings: window.dbitem, query: "ej.Query().from('Orders').select('ShipCity').take(5)" })
}
<script>

 

Thus you can load the list item dynamically with remote databinding in the child page.

Article ID: Published Date: Last Revised Date: Platform: Control:
5094 06/01/2015 06/01/2015 JavaScript ejmListView
Did you find this information helpful?
Comments
Jennifer Wright [Syncfusion] Jun 09, 2015
Test
Reply
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon