Code is below.
I have a treegrid where only the first page of data gets retrieved from the server. I thought this might be an issue with the startRow/endRow vs the number of rows actually being returned. The console says:
11:47:44.971:XRP4:WARN:Log:firing the callback from global eval with...
11:47:45.014:XRP4:WARN:Log:viewLoader is:[ViewLoader ID:isc_ViewLoader_135]
11:47:45.074:XRP4:WARN:drawing:isc_VLayout_219:Attempt to draw child of an undrawn parent - ignoring [Stack trace not supported in this browser]
11:47:48.646:XRP6:WARN:Log:firing the callback from global eval with...
11:47:48.686:XRP6:WARN:Log:viewLoader is:[ViewLoader ID:isc_ViewLoader_133]
11:47:48.831:XRP6:WARN:RPCManager:sendQueue called with no current queue, ignoring
11:47:48.964:XRP6:WARN:RPCManager:sendQueue called with no current queue, ignoring
First I would like to be sure I’ve got the paging params correct:
If the page size is 10 Smartclient makes a request to the server with startRow = 0 and endRow = 10. I should return 10 records with the startRow = 0 and the endRow = 9. (I have tried this with the endRow being 9 and 10).
Any ideas? This seems to be a problem on every Treegrid I’ve got.
Datasource (RestDataSource):
isc.defineClass("B2BDS", RestDataSource);
isc.B2BDS.addProperties({
dataProtocol:"postMessage",
showPrompt: false,
dataFormat: "xml",
initWidget : function () {
this.Super("initWidget", arguments);
},
operationBindings: [
{operationType:"fetch",dataURL:"/admin/service/SmartClientGeneric.ashx"},
{operationType:"add",dataURL:"/admin/service/SmartClientGeneric.ashx"},
{operationType:"update",dataURL:"/admin/service/SmartClientGeneric.ashx"},
{operationType:"remove",dataURL:"/admin/service/SmartClientGeneric.ashx"}
]
});
isc.B2BDS.create({
ID: "DSvuShowDefaultPermissions",
recordXPath: "//vuShowDefaultPermissions",
fields: [
{ name: "DivID", title: "DivID", type: "integer" },
{ name: "ShowCategoryID", title: "ShowCategoryID", type: "integer", optionDataSource: DSShowCategory, valueField: "ShowCategoryID", displayField: "Title" },
{ name: "ShowID", title: "ShowID", type: "integer" },
{ name: "ParentID", title: "ParentID", type: "integer", foreignKey: "DSvuShowMetadata.ShowID", rootValue: "0", canEdit: false },
{ name: "ShowFolderID", title: "ShowFolderID", type: "integer" },
{ name: "Sort", title: "Sort", type: "integer" },
{ name: "FolderTypeID", title: "FolderTypeID", type: "integer" },
{ name: "SessionID", title: "SessionID", type: "integer" },
{ name: "ObjectKey", title: "ObjectKey", type: "string", length: 27, primaryKey: true },
{ name: "ObjectName", title: "ObjectName", type: "string", length: 151,
getFieldValue: function(record, value, field, fieldName) {
return (XMLTools.selectString(record, ".//Overrides") == "true") ? " <b>" + XMLTools.selectString(record, ".//ObjectName") + "</b>" : XMLTools.selectString(record, ".//ObjectName");
}
},
{ name: "ShowCategoryTitle", title: "ShowCategoryTitle", type: "string", length: 50 },
{ name: "ShowName", title: "ShowName", type: "string", length: 100 },
{ name: "ShowFolderName", title: "ShowFolderName", type: "string", length: 50 },
{ name: "ViewPermission", title: "ViewPermission", type: "boolean", length: 5 },
{ name: "Overrides", title: "Overrides", type: "boolean", length: 5 },
{ name: "AlwaysFalse", title: "AlwaysFalse", type: "boolean", length: 5 },
{ name: "DownloadPermission", title: "DownloadPermission", type: "string", length: 5 },
{ name: "EditPermission", title: "EditPermission", type: "boolean", length: 5 },
{ name: "UploadPermission", title: "UploadPermission", type: "boolean", length: 5 },
{ name: "DeletePermission", title: "DeletePermission", type: "boolean", length: 5 },
{ name: "ShowManagerPermission", title: "ShowManagerPermission", type: "boolean", length: 5 },
{ name: "isFolder", title: "isFolder", type: "boolean", length: 5}],
operationBindings: [
{ operationType: "fetch", dataURL: "/admin/service/ShowDefaultPermissionGeneric.ashx" },
{ operationType: "add", dataURL: "/admin/service/ShowDefaultPermissionGeneric.ashx" },
{ operationType: "update", dataURL: "/admin/service/ShowDefaultPermissionGeneric.ashx" },
{ operationType: "remove", dataURL: "/admin/service/ShowDefaultPermissionGeneric.ashx" }
]
});
Treegrid:
isc.TreeGrid.create({
ID: "ShowsToUGsShowsPickList",
width: "100%",
showOpenIcons: false,
showDropIcons: true,
closedIconSuffix: "",
canAcceptDroppedRecords: false,
canDragRecordsOut: true,
dataSource: "DSvuShowDefaultPermissions",
autoFetchData: false,
showFilterEditor: true,
canEdit: false,
autoDraw: false,
dataPageSize: 20,
drawAheadRatio: 2,
autoSaveEdits: false,
showAllRecords: false,
showEmptyMessage: true,
dragDataAction: "copy",
drop: function() {},
recordDoubleClick: function() {
this.Super('recordDoubleClick', arguments)
},
alternateRecordStyles: true,
dataProperties: {
isFolderProperty: "AlwaysFalse"
},
getIcon: function(node) {
return null;
},
modalEditing: true,
animateFolders: false,
selectionType: "multiple",
fields: [
{ name: "ShowCategoryID", title: "Category", align: "left", width: 120, filterOnKeypress: true },
{ name: "ShowName", title: "Show", filterOnKeypress: true }
]
});