Your search did not match any results.
Lookup

Basics

Documentation
The Lookup is a widget that allows an end user to search for an item in a collection shown in a drop-down menu. This demo shows how to create a simple and a grouped Lookup.
Copy to Codepen
Apply
Reset
window.onload = function() { var viewModel = { lookupOptions: { items: employeesList, value: employeesList[0], showPopupTitle: false }, lookupGroupedOptions: { dataSource: new DevExpress.data.DataSource({ store: employeesTasks, key: "ID", group: "Assigned" }), grouped: true, closeOnOutsideClick: true, showPopupTitle: false, displayExpr: "Subject" } }; ko.applyBindings(viewModel, document.getElementById("demo")); };
<!DOCTYPE html> <html> <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="js/jquery-3.1.0.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.0/knockout-min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/17.1.4/css/dx.spa.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/17.1.4/css/dx.common.css" /> <link rel="dx-theme" data-theme="generic.light" href="https://cdn3.devexpress.com/jslib/17.1.4/css/dx.light.css" /> <link rel="dx-theme" data-theme="android5.light" href="https://cdn3.devexpress.com/jslib/17.1.4/css/dx.android5.light.css" /> <link rel="dx-theme" data-theme="ios7.default" href="https://cdn3.devexpress.com/jslib/17.1.4/css/dx.ios7.default.css" /> <link rel="dx-theme" data-theme="win10.black" href="https://cdn3.devexpress.com/jslib/17.1.4/css/dx.win10.black.css" /> <link rel="dx-theme" data-theme="win10.white" href="https://cdn3.devexpress.com/jslib/17.1.4/css/dx.win10.white.css" /> <script src="https://cdn3.devexpress.com/jslib/17.1.4/js/dx.all.js"></script> <script src="data.js"></script> <link rel="stylesheet" type ="text/css" href ="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="demo"> <div class="dx-fieldset"> <div class="dx-fieldset-header">Simple lookup</div> <div class="dx-field"> <div data-bind="dxLookup: lookupOptions"></div> </div> </div> <div class="dx-fieldset"> <div class="dx-fieldset-header">Grouped lookup</div> <div class="dx-field"> <div data-bind="dxLookup: lookupGroupedOptions"></div> </div> </div> </div> </div> </body> </html>
.dx-theme-generic .dx-fieldset { width: 40%; float: left; }
var employeesList = ["John Heart", "Samantha Bright", "Arthur Miller", "Robert Reagan", "Greta Sims", "Brett Wade", "Sandra Johnson", "Ed Holmes", "Barb Banks", "Kevin Carter", "Cindy Stanwick", "Sammy Hill", "Davey Jones", "Victor Norris", "Mary Stern", "Robin Cosworth", "Kelly Rodriguez", "James Anderson", "Antony Remmen", "Olivia Peyton", "Taylor Riley", "Amelia Harper", "Wally Hobbs", "Brad Jameson", "Karen Goodson", "Marcus Orbison", "Sandy Bright", "Morgan Kennedy", "Violet Bailey", "Ken Samuelson", "Nat Maguiree", "Bart Arnaz", "Leah Simpson", "Arnie Schwartz", "Billy Zimmer", "Samantha Piper", "Maggie Boxter", "Terry Bradley", "Gabe Jones", "Lucy Ball", "Jim Packard", "Hannah Brookly", "Harv Mudd", "Clark Morgan", "Todd Hoffman", "Jackie Garmin", "Lincoln Bartlett", "Brad Farkus", "Jenny Hobbs", "Dallas Lou", "Stu Pizaro"]; var employeesTasks = [{ "ID": 1, "Assigned": "Mr. John Heart", "Subject": "Choose between PPO and HMO Health Plan" }, { "ID": 2, "Assigned": "Mr. John Heart", "Subject": "Google AdWords Strategy" }, { "ID": 3, "Assigned": "Mr. John Heart", "Subject": "New Brochures" }, { "ID": 4, "Assigned": "Mr. John Heart", "Subject": "Update NDA Agreement" }, { "ID": 5, "Assigned": "Mr. John Heart", "Subject": "Review Product Recall Report by Engineering Team" }, { "ID": 6, "Assigned": "Mrs. Olivia Peyton", "Subject": "Update Personnel Files" }, { "ID": 7, "Assigned": "Mrs. Olivia Peyton", "Subject": "Review Health Insurance Options Under the Affordable Care Act" }, { "ID": 8, "Assigned": "Mrs. Olivia Peyton", "Subject": "Non-Compete Agreements" }, { "ID": 9, "Assigned": "Mrs. Olivia Peyton", "Subject": "Give Final Approval for Refunds" }, { "ID": 10, "Assigned": "Mr. Robert Reagan", "Subject": "Deliver R&D Plans for 2013" }, { "ID": 11, "Assigned": "Mr. Robert Reagan", "Subject": "Decide on Mobile Devices to Use in the Field" }, { "ID": 12, "Assigned": "Mr. Robert Reagan", "Subject": "Try New Touch-Enabled WinForms Apps" }, { "ID": 13, "Assigned": "Mr. Robert Reagan", "Subject": "Approval on Converting to New HDMI Specification" }, { "ID": 14, "Assigned": "Ms. Greta Sims", "Subject": "Approve Hiring of John Jeffers" }, { "ID": 15, "Assigned": "Ms. Greta Sims", "Subject": "Update Employee Files with New NDA" }, { "ID": 16, "Assigned": "Ms. Greta Sims", "Subject": "Provide New Health Insurance Docs" }];