or
Kendo UI mobile CSS v2012.2.710 tested on iPhone 4s IOS 5.1.1 and Chrome v19.0.1084.46 on Win7 There's always a gap at bottom, any solution? Also, the input will be doubled on Android while on focus. Demo: http://jsbin.com/ageruw/7
var
dataSource =
new
kendo.data.DataSource({
type:
"odata"
,
serverPaging:
true
,
serverSorting:
true
,
serverFiltering:
true
,
pageSize: 20,
batch:
false
,
schema: {
model: {
id:
"No_"
,
fields: {
No_: { type:
"string"
},
Customer_WR_Code: { type:
"string"
},
Description: { type:
"string"
},
State: { type:
"string"
},
Creation_Date: { type:
"date"
},
Creation_Time: { type:
"date"
},
Closing_Date: { type:
"date"
},
Closing_Time: { type:
"date"
},
Cancelling_Date: { type:
"date"
},
Cancelling_Time: { type:
"date"
},
Expiry_Date: { type:
"date"
},
Appointment_Begin_Date: { type:
"date"
},
Appointment_Begin_Time: { type:
"date"
},
Appointment_End_Time: { type:
"date"
},
Appointment_End_Date: { type:
"date"
},
DateTime_Field_1: { type:
"date"
},
DateTime_Field_2: { type:
"date"
},
Date_Field_1: {type:
"date"
},
Date_Field_2: {type:
"date"
}
}
}
},
transport: {
read:
"WCFDB.svc/View_Work_Request"
,
update: {
url:
"WCFDB.svc/View_Work_Request"
,
type:
"POST"
,
dataType:
"json"
}
}
});
$(
"#grid"
).kendoGrid({
dataSource: dataSource,
height: 550,
pageable: {
refresh:
true
,
pageSizes:
true
},
reorderable:
true
,
editable:
"inline"
,
sortable:
true
,
filterable:
true
,
columnMenu:
true
,
navigatable:
false
,
resizable:
true
,
toolbar: kendo.template($(
"#tmplToolBar"
).html()),
change:
function
(e) {
var
grid = $(
"#grid"
).data(
"kendoGrid"
);
var
model = grid.dataItem(grid.select());
refreshTab(model);
},
dataBound:
function
(e) {
var
item = e.sender.dataSource.at(0); refreshTab(item); },
selectable:
"row"
,
columns: kendoGridColumns
});
[JSONPSupportBehavior]
public class WCFDB : DataService<WOMContainer>
{
// Questo metodo viene chiamato solo una volta per inizializzare i criteri a livello di servizio.
public static void InitializeService(DataServiceConfiguration config)
{
// TODO: impostare regole per indicare i set di entità e le operazioni del servizio visibili, aggiornabili e così via.
// Esempi:
config.SetEntitySetPageSize(
"*"
, 20);
config.SetEntitySetAccessRule(
"*"
, EntitySetRights.All);
config.SetServiceOperationAccessRule(
"*"
, ServiceOperationRights.All);
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
config.UseVerboseErrors =
true
;
}
................................
................................
................................
................................
<script> | |
jQuery(function () { | |
shoppingLists_datasource = new kendo.data.DataSource({ | |
pageSize:4, | |
schema:{ | |
model: { | |
id: 'familyShoppingList_id', | |
fields: { | |
familyShoppingList_id: { editable: false, nullable: true }, | |
shoppingList_main: { editable: true}, | |
shoppingList_date: { editable: true} | |
} | |
} | |
}, | |
transport:{ | |
read:{ | |
url:'/apps/wpd/apps/shopping/index.cfc?method=getShoppingLists', | |
dataType: 'json' | |
}, | |
create:{ | |
url:'/apps/wpd/apps/shopping/index.cfc?method=saveShoppingList', | |
dataType: 'json' | |
}, | |
update:{ | |
url:'/apps/wpd/apps/shopping/index.cfc?method=saveShoppingList', | |
dataType: 'json' | |
}, | |
destroy:{ | |
url:'/apps/wpd/apps/shopping/index.cfc?method=removeShoppingList', | |
dataType: 'json' | |
} | |
} | |
}) | |
}) | |
</script> | |
<script> | |
var shoppingLists_listView; | |
jQuery(function () { | |
shoppingLists_listView = jQuery("#shoppingLists").kendoListView({ | |
dataSource: shoppingLists_datasource, | |
template: kendo.template($("#viewTemplate").html()), | |
editTemplate: kendo.template($("#editTemplate").html()) | |
}) | |
.delegate(".k-edit-button", "click", function(e) { | |
shoppingLists_listView.edit($(this).closest(".list-view")); | |
e.preventDefault(); | |
}) | |
.delegate(".k-delete-button", "click", confirmDel) | |
.delegate(".k-update-button", "click", function(e) { | |
shoppingLists_listView.save(); | |
e.preventDefault(); | |
}) | |
.delegate(".k-cancel-button", "click", function(e) { | |
shoppingLists_listView.cancel(); | |
e.preventDefault(); | |
}) | |
.data("kendoListView") | |
}) | |
</script> |