我正在使用包含 2 列 "name" 和 "age" 的 dojo 数据网格,要求是在数据网格中的 "name" 列上提供过滤选项。以便用户可以通过单击名称列的标题从值列表中搜索和选择他/她的名字。是否有任何选项需要在布局中设置。有人可以帮忙吗?
var layout = [
{field: "Name", name: "Name", width: '200px' },
{field: "Age", name: "Age", width: '100px' },
];
var resultStore = new ObjectStore({ objectStore:new Memory({ data: [],idProperty:"id" }) });
var dGrid = new dojox.grid.DataGrid({
store: resultStore,
selectionMode: "none",
autoHeight: true,
structure: layout,
sortInfo: 1,
canSort: function(colIndex) {
return true;
}
});