dojo Datagrid filter select that allows user to select from a list of values in the column

强颜欢笑 提交于 2019-12-24 05:55:22

问题


I m using dojo datagrid which contains 2 columns "name" and "age" , the requirement is to provide the filtering option on the "name" column in the datagrid. so that user can search and select his/her name from the list of values ,by clicking on the header of the name column. Is there any option that need to set in layout for the same. can some one please help on this.

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;
                }                   
            });

来源:https://stackoverflow.com/questions/54544642/dojo-datagrid-filter-select-that-allows-user-to-select-from-a-list-of-values-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!