From f09751b2ea7e480bf15b7e6254e5240aa08507fe Mon Sep 17 00:00:00 2001 From: Jared Scott Date: Fri, 7 Feb 2014 14:32:49 -0800 Subject: [PATCH 1/2] Frozen cell contents not appended when > 15 cols This fixes an issue where the frozen cells show up blank when there is a large number of columns and the user has scrolled horizontally. to reproduce: 1. on one of the example files add ~ 50 columns programatically with perhaps 100 rows (you have to scroll to trigger the virtual rendering). 2. load the page and scroll horizontally towards the end of the list of columns 3. scroll vertically. Note that the frozen column cells remain blank --- slick.grid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slick.grid.js b/slick.grid.js index 643f27864..eb047d828 100644 --- a/slick.grid.js +++ b/slick.grid.js @@ -1944,7 +1944,7 @@ if (typeof Slick === "undefined") { appendCellHtml(stringArrayL, row, i, colspan, d); } } else if (( options.frozenColumn > -1 ) && ( i <= options.frozenColumn )) { - appendCellHtml(stringArrayL, row, i, colspan); + appendCellHtml(stringArrayL, row, i, colspan, d); } if (colspan > 1) { From 51a4bcbb96f39cc0fe08ba09ca53f443579b50f9 Mon Sep 17 00:00:00 2001 From: Jared Scott Date: Tue, 18 Feb 2014 11:08:58 -0800 Subject: [PATCH 2/2] Updating example cols and rows to show expected output --- examples/example-frozen-columns-and-rows.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/examples/example-frozen-columns-and-rows.html b/examples/example-frozen-columns-and-rows.html index 6f2847a07..efcf4ec32 100644 --- a/examples/example-frozen-columns-and-rows.html +++ b/examples/example-frozen-columns-and-rows.html @@ -215,6 +215,18 @@

Demonstrates:

sortable: true }]; + for (var i = 5; i < 100; i += 1) { + columns.push({ + id: "title" + i, + name: "Title" + i, + field: "title" + i, + cssClass: "cell-title", + editor: Slick.Editors.Text, + validator: requiredFieldValidator, + sortable: true + }); + } + var columnFilters = {}; var options = { @@ -328,6 +340,11 @@

Demonstrates:

d["title2"] = i; d["title3"] = i; d["title4"] = i; + + for (var j = 5; j < 100; j += 1) { + d["title" + j] = i; + } + }