or
Requirements |
|
Kendo UI for ASP.NET MVC Q2 2012 SP1 |
|
jQuery v1.7.1 |
|
IE8, FF18 |
|
Components/Widgets Grid |
So, on the KendoEditor there is a Tooltip field. as the title states, this field only populates the Alt attribute. This only works as a tooltip in IE <= 7. It should be populating the Title attribute (or, perhaps both for compatibility) or be renamed to match what it actually does.
$(document).ready(
function
() {
var
dateFormat =
"{0:M/d/yy}"
;
var
datetimeFormat =
"{0:M/d/yy h:mm tt}"
;
var
d =
new
Date(2012, 11, 8, 11, 20);
var
d2 =
new
Date(2012, 11, 8);
$(
'#StartWithDate'
).kendoDateTimePicker({
value: d,
format: (d.getHours() === 0) ? dateFormat : datetimeFormat,
change:
function
(e) {
/* what goes here */
}
});
$(
'#StartWithDateTime'
).kendoDateTimePicker({
value: d2,
format: (d2.getHours() === 0) ? dateFormat : datetimeFormat,
change:
function
(e) {
/* what goes here */
}
});
});
var
viewModel = kendo.observable({
OrderNumber: {
Value:
''
,
IsValid:
function
(){
return
(
this
.get(
'Value'
).length >= 8);
},
Message:
function
(){
if
(
this
.get(
'IsValid'
)){
return
''
;
}
else
{
return
'Text length must be at least 8 characters.'
;
}
}
}
});
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: baseurl + "/Vendor/getData",
type: "POST",
dataType: "json"
}
}
});
$("#mygrid").kendoGrid({
dataSource: dataSource,
height: 280
});
<
div
id
=
"mygrid"
>
</
div
>
[HttpPost]
public ActionResult getData([DataSourceRequest]DataSourceRequest request)
{
var vendorRegistrationTask = (IVendorRegistrationTask)new VendorTaskFactory<
VendorRegistrationTask
>().CreateObject();
var dataitem = vendorRegistrationTask.getDocument(10);
DataSourceResult result = dataitem.ToDataSourceResult(request);
return Json(result ,JsonRequestBehavior.AllowGet);
}