Note that there are some explanatory texts on larger screens.

plurals
  1. POkendo UI DropDownList behaves weird
    text
    copied!<p>I have the following code. When fetching the value selected, it works fine. But if I try put the selected value in any condition, it falters. the code crashes.</p> <pre><code>var onAcctMgrSelect = function (e) { // access the selected item via e.item (jQuery object) ddAMList = $("#ddAM").data("kendoDropDownList"); if (ddAMList.value() == "0") $("#btnSearch").attr("class", "k-button k-state-disabled"); else $("#btnSearch").attr("class", "k-button"); ///alert(ddAMList.text()); checkValidData(); }; </code></pre> <p>DropDownlist Code is as below:</p> <pre><code>function loadAccountManagers() { $("#ddAM").kendoDropDownList({ change: onAcctMgrSelect, dataTextField: "AcctMgrFullName", dataValueField: "Id", dataSource: { schema: { data: "d", // svc services return JSON in the following format { "d": &lt;result&gt; }. Specify how to get the result. total: "count", model: { // define the model of the data source. Required for validation and property types. id: "Id", fields: { Id: { validation: { required: true }, type: "int" }, AcctMgrFullName: { type: "string", validation: { required: true} } } } }, transport: { read: { url: "../services/Prospects.svc/GetAccountManagers", //specify the URL which data should return the records. This is the Read method of the Products.svc service. contentType: "application/json; charset=utf-8", // tells the web service to serialize JSON type: "GET" //use HTTP POST request as the default GET is not allowed for svc } } } }); </code></pre> <p>I'm basically trying to disable the submit button if the first item is selected (which is a blank item in my case with a value of '0').</p> <p>Am I going wrong anywhere? Please help!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload