jQWidgets Forums
jQuery UI Widgets › Forums › Grid › not fill the rows, but leaves empty
Tagged: #jqwidgets-grid, grid, javascript grid, jquery grid
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 8 years, 3 months ago.
-
Author
-
I built a grid with the following code:
source = { localdata: jsondati.dati, datatype: 'json', addrow: function (rowid, rowdata, position, commit) { commit(true); } }; var cellclass = function (row, columnfield, value) { if (buttonClick != -1) { if (buttonClick == row) return "highlightsClass"; } }; var columns = [ { text: titleGrid[0], datafield: 'puntointeresse', align: 'center', cellsalign: 'left', width: 100, cellclassname: cellclass, index: 0 }, { text: titleGrid[1], datafield: 'indirizzo', align: 'center', cellsalign: 'left', cellclassname: cellclass, index: 1 }, { text: "Categoria", datafield: 'tipopuntointeresse', align: 'center', cellsalign: 'center', width: 100, cellclassname: cellclass, index: 2 }, { text: "", datafield: "FasciaOraria", align: "center", cellsalign: "center", width: 40, editable: false, sortable: false, cellclassname: cellclass, cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties) { var eventName = "onClick"; return defaulthtml.replace(">" + value, "><a " + eventName + "='ShowDetails(" + row + ", event)' style='color: #3d4a77;' href='javascript:;'><i class='icon icon-marker1' style='font-size: 17px; cursor: pointer;'></i></a>"); }, } ]; var hq = $("#jqxWidget").css("height"); try { $("#jqxgrid").jqxGrid( { width: 602, height: hq, source: source, altrows: true, sortable: true, editable: false, selectionmode: 'singlerow', scrollbarsize: 6, columns: columns, }); Visualizza(); } catch (e) { var qwerty = e.message; }
but it happens that does not fill all the rows, but fills and two other leaves them empty (example image). I tried to see but it seems to run fine. I do not know what happens …
You could help, pre pleasure?Hello dave11,
You should set a DataAdapter. Please, take a look at this demo:
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/defaultfunctionality.htm?lightBest Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHello Hristo,
the problem is not on the DataAdapter. I have been a lot of time looking at the page, and in the various events (type: given that nonetheless seemed to me the scroll, I shrugged and I looked the other rows) I noticed that the DataAdapter and there was “complete.”
I entered the table in the event “ready” the “updatebounddata” and then I appear all rows.
I do not know why, where depends on the problem, unfortunately I had to do it this way.
Many thanks Hristo.Hello dave11,
I checked your source and I do not see the DataAdapter.
Please, take a look at this forum topic:
http://www.jqwidgets.com/community/topic/grid-data-source-not-from-jqxdataadapter/#post-42084Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.