kendo autocompletion issue

gameksh

New Member
Now im dealing with kendo autocomplete.But its not working properly.I dont understand whats the problem.Here is my code.Please help me out to solve this..\[code\]$("#autocomplete").kendoAutoComplete({ minLength : 1, dataSource: new kendo.data.DataSource({ serverFiltering: true, dataType: "json", transport: { read: { url: "data/emp_det.php", parameterMap: function(options, operation) { return { StartsWith: options.filter.filters[0].value } } }, }, schema: { data: "data" }, }), dataTextField: "user_name", });})(jQuery, kendo);\[/code\]my php file is\[code\]<?php$db = new PDO('mysql:host=localhost;dbname=abc', 'root', ''); $arr = array(); $stmt = $db->prepare("SELECT id, user_name FROM employee WHERE user_name LIKE ?");if ($stmt->execute(array($_GET["StartsWith"]. "%"))) { while ($row = $stmt->fetch()) { $arr[] = $row; } } header("Content-type: application/json"); echo "{\"data\":" .json_encode($arr). "}";?>\[/code\]
 
Top