我正在研究dojo增强的网格视图。我能够在UI中显示网格。但是AnyColumn选项被添加为新列。
任何帮助将不胜感激......
这是代码
var mygrid = new EnhancedGrid({
id: "grid",
store: gridStore, //Data store passed as input
structure: gridStructure, //Column structure passed as input
autoHeight: true,
autoWidth: true,
initialWidth: width,
canSort : true,
plugins: {
filter: {
//Filter operation
isServerSide: true,
disabledConditions : {"anycolumn" : ["equal","less","lessEqual","larger","largerEqual","contains","startsWith","endsWith","equalTo","notContains","notEqualTo","notStartsWith","notEndsWith"]},
setupFilterQuery: function(commands, request){
if(commands.filter && commands.enable){
//filter operation
}
}
}
}, dojo.byId("mydatagrid"));
mygrid.startup();
谢谢, Lishanth
答案 0 :(得分:1)
首先,不要使用EnhancedGrid,而是使用dgrid或gridx。
我认为默认情况下,任何列都会添加到下拉列表中。如果你想删除,我建议
或者您也可以尝试类似
的内容DECLARE @sql VARCHAR(8000)
SELECT @sql = Stuff((SELECT 'union all select ' + sumstrings
FROM #thesums
FOR xml path('')), 1, 9, '')
PRINT @sql
EXEC (@sql)
更新的答案是。我知道这不是优雅的做法,但它有效。
dojo.forEach(this.yourgrid.pluginMgr.getPlugin('filter').filterDefDialog._cboxes, function(dropdownbox) {
dropdownbox._colSelect.removeOption(dropdownbox.options[0]);
});