Your search did not match any results.

Web API Service


This example demonstrates the List widget loading data from a Web API service.

Copy to CodePen
$(function(){ var store ={ loadUrl: "", }); var listData = new{ store: store, paginate: true, pageSize: 1, sort: "ProductName", group: "Category.CategoryName", filter: [ 'UnitPrice', '>', 15 ], }); var formatCurrency = new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD', minimumFractionDigits: 2, maximumFractionDigits: 2 }).format $("#list").dxList({ dataSource: listData, itemTemplate: function(data) { var price = formatCurrency(data.UnitPrice); return $("<div>") .append($("<div>").text(data.CategoryName)) .append($("<div>").text(data.ProductName)) .append($("<b>").text(price)); }, grouped: true, collapsibleGroups: true, selectionMode: "multiple", showSelectionControls: true, pageLoadMode: "scrollBottom", height: 600 }); });
<!DOCTYPE html> <html xmlns=""> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src=""></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script> <link rel="stylesheet" type="text/css" href="" /> <link rel="stylesheet" type="text/css" href="" /> <script src=""></script> <script src=""></script> <script src="index.js"></script> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="list"></div> </div> </body> </html>