or
<div class=
"search"
>
<input id=
"autoComplete"
name=
"txtQuickSearch"
type=
"text"
value=
"product search"
onclick=
"this.value='';"
onblur=
"if(this.value=='')this.value='product search';"
class=
"search_field"
/>
</form>
</div>
<script>
$(document).ready(
function
() {
$(
"#autoComplete"
).kendoAutoComplete({
minLength: 3,
dataTextField:
"productName"
,
// XML property name to use
dataSource:
new
kendo.data.DataSource({
type:
"xml"
,
// specifies data protocol
pageSize: 10,
// limits result set
// data: "/products/product/productName",
transport: {
},
schema: {
type:
"xml"
,
data:
"/products/product"
,
model: {
fields: {
productName:
"productName"
}
}
}
})
//below doesnt work
/* minLength: 3,
//dataTextField: "ProductName",
separator: ", ",
dataSource: {
type: "xml",
serverFiltering: true,
serverPaging: true,
pageSize: 20,
transport: {
read: "products.xml"
}
}*/
});
});
$.each($(
".kendoGrid"
),
function
() {
loadJobGrid(
'#'
+ $(
this
).attr(
'id'
));
})
$(
".jobLocationLink"
).live(
'click'
,
function
() {
currentJobId = $(
this
).data(
"id"
);
var
parentGrid = $(
this
).data(
"parentGrid"
);
var
title = $(
this
).attr(
"title"
);
var
href =
"../ModalWindows/JobLocationNotes.aspx?jobId="
+ currentJobId;
var
myWin = $(
"#jobLocationWindow"
)
if
(!myWin.data(
"kendoWindow"
)) {
// window not yet initialized
myWin.kendoWindow({
content: href,
center:
true
,
title:
"Job Location History"
,
iframe:
true
,
width:
"800px"
,
height:
"400px"
,
scrollable:
false
});
}
else
{
// reopening window
myWin.data(
"kendoWindow"
)
.refresh(href)
// request the URL via AJAX
.open()
// open the window
.center();
}
});