jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Grid loads in debugger but not live
Tagged: #jqwidgets-grid, grid, javascript grid, jquery grid
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 7 years, 5 months ago.
-
Author
-
I have a strange issue … I am attempting to load a grid as shown below:
var logfilesource = {
datatype: “xml”,
datafields: [
{ name: ‘LogFile_ID’, type: ‘number’ },
{ name: ‘ETLProcess_ID’, type: ‘number’ },
{ name: ‘ETLProcessName’, type: ‘string’ },
{ name: ‘LogFileName’, type: ‘string’ },
{ name: ‘Message’, type: ‘string’ },
{ name: ‘Failure’, type: ‘bool’ },
{ name: ‘FailureReason’, type: ‘string’ },
{ name: ‘DateCreated’, type: ‘date’ }
],
async: false,
record: ‘Table’,
url: ‘ETLDashboard.aspx/GetLogFileAll’
};
var logfileAdapter = new $.jqx.dataAdapter(logfilesource, {
autoBind: true,
contentType: ‘application/json; charset=utf-8’
});
logfileAdapter.dataBind();$(“#jqxlogfilegrid”).jqxGrid(
{
width: ‘100%’,
theme: ‘energyblue’,
source: logfileAdapter,
pageable: true,
editable: false,
filterable: false,
sortable: false,
autoheight: true,
pagesize: 15,
pagerheight: 40,
rowsheight: 22,
columnsheight: 44,
selectionmode: ‘singlerow’,
showtoolbar: true,
toolbarheight: 40,
altrows: true,
rendertoolbar: function (toolbar) {
var container = $(“<div style=’overflow: hidden; position: relative; height: 100%, width: 100%; margin: 5px;’></div>”);
var title = $(“<span style=’float: left; margin-top: 2px; margin-right: 2px; font-size: 120%;’>wRpt.ETLDashboardLogFile – DoubleClick row for more detail</span>”);
toolbar.append(container);
container.append(title);
},
columns: [
{ text: ‘Date’, datafield: ‘DateCreated’, editable: false, filterable: false, sortable: false, cellsformat: ‘MM/dd/yyyy’, width: ‘11%’ },
{ text: ‘ETL Process’, datafield: ‘ETLProcessName’, editable: false, filterable: false, sortable: false, width: ‘46%’ },
{
text: ‘Failure’, datafield: ‘Failure’, editable: true, sortable: false, filterable: false,
menu: false, width: ‘7%’, type: ‘bool’, columntype: ‘checkbox’
},
{ text: ‘Failure Reason’, datafield: ‘FailureReason’, editable: false, filterable: false, sortable: false, width: ‘36%’ }
]
});The grid loads fine when I run the program in debug mode – but fails with No data in normal run mode. Can you think of any condition that would cause this sort of behavior
Thanks,
Tom AshmoreHello Tom Ashmore,
Could you write me if there any error message on the console?
Also, what you mean by “normal run mode”?
Hint: It seems like you do not host your project correctly. You could try to check where your project is hosted and is the data storage (url: ‘ETLDashboard.aspx/GetLogFileAll’) is in the root directory.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.