Ignite ui 在IgGrid加载后,如何为特定列设置allowSorting false?
我已经将这个网格下初始化作为一个通用函数进行了全球化。我已经使用排序作为所有列的默认值。我需要在IgGrid加载后为特定列设置allowSorting。我在这里添加了一个示例代码。我无法在此变量colSettings中设置allowSortingIgnite ui 在IgGrid加载后,如何为特定列设置allowSorting false?,ignite-ui,Ignite Ui,我已经将这个网格下初始化作为一个通用函数进行了全球化。我已经使用排序作为所有列的默认值。我需要在IgGrid加载后为特定列设置allowSorting。我在这里添加了一个示例代码。我无法在此变量colSettings中设置allowSorting $("#gridSorting").igGrid({ primaryKey: "ProductID", columns: [ { headerText: "Produc
$("#gridSorting").igGrid({
primaryKey: "ProductID",
columns: [
{ headerText: "Product ID", key: "ProductID", dataType: "number" },
{ headerText: "Product Name", key: "Name", dataType: "string", template: '<a id="name${ProductID}">${Name}</a>' },
{ headerText: "Product Number", key: "ProductNumber", dataType: "string", template: '<input type="text" class="txtBox" id="${ProductID}" value="" />' },
{ headerText: "Product Key", key: "ProductKey", dataType: "string", template: '<input type="text" class="txtBox1" maxlength="4" id="${ProductKey}" value="${ProductKey}" />' }
],
features: [
{
name: "RowSelectors",
enableCheckBoxes: true,
enableRowNumbering: false
},
{
name: "Selection",
mode: 'row',
multipleSelection: true
},
{
name: "Sorting",
type: "local"
}
],
width: "500px",
dataSource: products
});
var colSettings = [
{
columnKey: 'ProductID',
allowSorting: true
},
{
columnKey: 'Name',
allowSorting: true
},
{
columnKey: 'ProductNumber',
allowSorting: false
}
];
$("#gridSorting").igGridSorting("option", "columnSettings", colSettings);
请告诉我如何为本例中的特定列设置allowSorting:false。在调用示例中的sorting setOption后,您是否能够对ProductNumber列进行排序?我已经对此进行了测试,一切正常。也许你使用的是早期版本?