English 中文(简体)
如何在 extjs4 在网格中创建动态列?
原标题:how to create dynamic columns in the grid in extjs4?
  • 时间:2012-05-22 11:55:27
  •  标签:
  • grid
  • extjs4

在窗体面板中,我有格式和网格,当我点击搜索按钮时,只要它只显示网格中特定的列

问题回答

首先,您必须使用 clunnheader 获得列的引用,然后您可以调用 set Vevisible 来显示或隐藏该列,例如:

// hide all columns except the one with a dataIndex of  foo_data 

grid.getView().getHeaderCt().items.each(function(column) {
    var isFooColumn = column.dataIndex ==  foo_data ;
    column.setVisible(isFooColumn);
});




相关问题
How to get row index of the selected cell in WPF grid

Does anyone knows how to get row index of the selected cell in DevExpress WPF grid? In WinForms it was something like that: dataGridViewControll.SelectedCells[0].RowIndex;

TextBoxColumn in DevexpressGridControl (WPF)

In Windows grid is sucha a thing like DataGridViewTextBoxColumn col = new DataGridViewTextBoxColumn(); Is something like that in DevExpress GridControll for WPF?Or maybe is possible to do some ...

Grid Chart using GWT

Is there any library in gwt that will create grid chart, something similar to this : http://www.eyescience.com/images/vision/amsler_grid.gif. Thank you.

PBS and specify nodes to use

when you submit jobs to a PBS server, is it possible to specify the nodes that we want to use in a list? Thanks

Grid sorting with persistent master sort

I have a UI with a grid. Each record in the grid is sorted by a "master" sort column, let s call it a page number. Each record is a story in a magazine. I want the user to be able to drag and drop ...

热门标签