Thursday, 12 September 2013

can i put a message when the dropdown list has zero data to be shown

can i put a message when the dropdown list has zero data to be shown

i have a kendo dropdown list and its working,, im just wondering if i can
put a message that will pop up or to be shown when the kendodropdown have
zero data to be shown...can i do it using jquery???
heres my code
<input id="ddlWorker" name="Worker" class:"validate[required] inputLong"
style="width: 400px;" value="@workerPosId" required />
$("#ddlWorker").kendoDropDownList({
dataTextField: "workerName",
dataValueField: "workerID",
autoBind: false,
optionLabel: {
workerName: "--- Please Assign A Worker ---",
workerID: ""
},
// define custom template
template:
'<h5>${ data.workerName }</h5>' +
'#if(data.AvailableDay_LookID) {#<p>${ data.AvailableDay_LookID }</p>#}#' +
'#if(data.StartTime && data.EndTime) {#<p>${ data.StartTime } - ${
data.EndTime }</p>#}#',
dataSource: {
transport: {
read: {
url:
'/Client/LoadWorkerDropdownList?clientCusPosShiftId='
+ clientCusPosShiftId,
dataType: "json",
type: "POST"
}
}
}
});
thanks.

No comments:

Post a Comment