|
Title: Set combobox value on select Post by: jmeek01 on September 16, 2015, 12:02:13 PM I have been following the examples and issues in the forum. However, am not able get the selected value from the combobox list to populate the combobox.
<input class="easyui-combobox" data-options="url: '/api/labapi/patients', method: 'get', valueField: 'Id', textField: 'Display'" style="width:100%;height:24px"> I don't see how this is any different than the online examples, but it is not selecting the value. Title: Re: Set combobox value on select Post by: jarry on September 16, 2015, 03:30:53 PM Call setValue or getValue methods to set or get the combobox value. Please refer to http://www.jeasyui.com/demo/main/index.php?plugin=ComboBox&theme=default&dir=ltr&pitem=ComboBox%20Actions
Title: Re: Set combobox value on select Post by: jmeek01 on September 16, 2015, 05:49:09 PM I will take a closer look at that sample, but I am looking to have the combobox be populated without external buttons more like this example:
http://www.jeasyui.com/demo/main/index.php?plugin=ComboBox&theme=default&dir=ltr&pitem=ComboBox%20Actions User should be able to select the dropdown and pick an item from the list to be placed in the combobox. I thought perhaps I need to specify onSelect event as shown below. But the online examples seem to work without specifying the onSelect event. <head> <meta charset="UTF-8"> <link href="~/Content/jeasyui/themes/default/easyui.css" rel="stylesheet" type="text/css" /> <link href="~/Content/jeasyui/icon.css" rel="stylesheet" type="text/css"/> <link href="~/Content/myStyle.css" rel="stylesheet" type="text/css"/> <script src="~/Scripts/jeasyui/jquery.min.js"></script> <script src="~/Scripts/jeasyui/jquery.easyui.min.js"></script> </head> <table> <tr class="btmPadRow"> <td>Id:</td> <td> <input class="easyui-combobox" name="id" data-options="url: '/api/labapi/patients', method: 'get', valueField: 'Value', textField: 'Display', onSelect: function(record){ if (record){ $('#id').combobox('setValue',record); } }" style="width:100%;height:24px"> </td> </tr> </table> Title: Re: Set combobox value on select Post by: jmeek01 on September 16, 2015, 06:27:50 PM Well I think I may have come across the real issue. I am developing in ASP .NET MVC and by default is includes jquery-10.2.js, jquery-1.10.2.min.js, and jquery-1.10.2.intellisense.js
Removing the configuration that adds references to the master page header has enabled the jeasyui components to work as expected. Jason |