gpt4 book ai didi

jquery - Slickgrid 选择标题列中的复选框

转载 作者:行者123 更新时间:2023-12-01 08:06:57 24 4
gpt4 key购买 nike

如何选择 slickgrid 中的标题复选框?在我的 slickgrid 中,我只能选择所有列,无法选择列标题中的复选框。

var variablesRows = [];
var columns = [];
columns.push(checkboxSelector.getColumnDefinition());
columns[1] = { id: "description", name: "Description", field: "description",
sortable: true, width: 311 };

// Define table options
var options = {
enableCellNavigation: true,
enableColumnReorder: true,
explicitInitialization: true,
multiColumnSort: true,
forceFitColumns: true
};

// Create rows
for (var i = 0; i < variableTypes.length; i++) {
variablesRows[i] = {
description: variableTypes[i].Description,
id: variableTypes[i].VariableId,
vtype: variableTypes[i].VType,
valuetype: variableTypes[i].ValueType.replace(/\ /g, '_')
};
}

variablesDataView = new Slick.Data.DataView();

// Create grid
variablesGrid = new Slick.Grid("#FDvariableFilterDiv", variablesDataView,
columns, options);

最佳答案

尝试如下,

var checkboxSelector = new Slick.CheckboxSelectColumn({
cssClass: "slick-cell-checkboxsel"
});
columns.push(checkboxSelector.getColumnDefinition());
grid.registerPlugin(checkboxSelector);

关于jquery - Slickgrid 选择标题列中的复选框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15926592/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com