Slickgrid example5 折叠不起作用

Slickgrid example5 collapsing is not working

这是我第一次使用 Slickgrid,我已经在我的组织中配置了 slickgrid treeview example5。不幸的是无法使崩溃工作。调试后我注意到的一件事是没有调用 onRowCountChanged 事件。

谁能帮帮我她。提前致谢...

我将页面上的事件连接为 --

        $(function () { 
          Visualforce.remoting.Manager.invokeAction(
              '{!$RemoteAction.QuoteHandler_c.getQuoteItems}','{!quote.id}',
              function(result, event) {
                  quoteItems = result;
                  prepateData();
                  // initialize the model
            dataView = new Slick.Data.DataView({ inlineFilters: true });
                  dataView.beginUpdate();       
                  dataView.setItems(data);
                  dataView.setFilter(myFilter);
                  dataView.endUpdate();
                    // initialize the grid
        grid = new Slick.Grid("#myGrid", dataView, columns, options);

                  grid.onClick.subscribe(function (e, args) {
                    if ($(e.target).hasClass("toggle")) {
                      var item = dataView.getItem(args.row);
                      if (item) {
                        if (!item._collapsed) {
                          item._collapsed = true;
                        } else {
                          item._collapsed = false;
                        }

                        dataView.updateItem(item.id, item);
                      }
                      e.stopImmediatePropagation();
                    }
                  });


                  // wire up model events to drive the grid
                  dataView.onRowCountChanged.subscribe(function (e, args) {
                    grid.updateRowCount();
                    grid.render();
                  });

                  dataView.onRowsChanged.subscribe(function (e, args) {
                    grid.invalidateRows(args.rows);
                    grid.render();
                  });

                  var h_runfilters = null;
                  // wire up the slider to apply the filter to the model
                  $("#pcSlider").slider({
                    "range": "min",
                    "slide": function (event, ui) {
                      Slick.GlobalEditorLock.cancelCurrentEdit();
                      if (percentCompleteThreshold != ui.value) {
                        window.clearTimeout(h_runfilters);
                    h_runfilters = window.setTimeout(dataView.refresh, 10);
                        percentCompleteThreshold = ui.value;
                      }
                    }
                  });
             // wire up the search textbox to apply the filter to the model
                  $("#txtSearch").keyup(function (e) {

                    Slick.GlobalEditorLock.cancelCurrentEdit();
                    // clear on Esc
                    if (e.which == 27) {
                      this.value = "";
                    }
                    searchString = this.value;
                    dataView.refresh();
                  })


              }
          );

        })

感谢您的帮助...

我明白了。错误与 myFilter 函数有关。因此,行数总是返回相同,因此不会调用 onRowsCountChanged。