【问题标题】:Get current Sort Key Of Backgrid Table获取 Backgrid 表的当前排序键
【发布时间】:2017-11-21 10:17:45
【问题描述】:

我有 Backgrid.js 制作的下表:

this.grid = new FixedWidthGrid({
        columns: this.columns,
        row: SelectableDocumentContextMenuRow.extend({
            contextMenu: ContextMenuHelper.onRightClick
        }),
        collection: self.collection,
        header: FilterHeader,
        contextMenu: ContextMenuHelper.onRightClick
    });

现在,当我单击标题标签时,整个表格将按客户端上的该属性进行排序。

如何获取收藏的当前排序键/属性(例如姓名、年龄等)?

【问题讨论】:

    标签: backbone.js backgrid


    【解决方案1】:

    如果您使用的是backbone.paginator,您应该能够通过检查collection.state.sortKey 的值来获得此信息

    【讨论】:

      猜你喜欢
      • 2015-11-15
      • 2020-08-24
      • 1970-01-01
      • 1970-01-01
      • 2013-01-14
      • 2012-07-30
      • 1970-01-01
      • 2011-01-04
      • 2014-02-07
      相关资源
      最近更新 更多