Ext JS SortType treecolumn

时间:2017-11-29 23:58:14

标签: javascript web extjs

使用ExtJS 4.2.3。具有treecolumn xtype字段的表单,其中包含字符串值,其中包含number中的数字。柱子有3个结构。在第一个lvl排序需要像(2,3,5,40,100等)。

enter image description here

在选择表格中选择第三个lvl值后,框中的值将如下所示:

3.ABC.<BR>3.23.ABCCDD.<BR>3.23.5.  ABCC

代码示例:

enter Picker = new Project.Picker({
                                    title: "Title1",
                                    proxyCfg: {
                                        url: Ext.state.Manager.get("url") + "TreeList",
                                        type: "ajax"},
                                    idProperty: "id",
                                    defaultRootId: "NULL",
                                    nodeParam: "parent_Code",
                                    PickerCfg: [
                                        { name: "id", type: "string", isSC: false },
                                        { xtype: "treecolumn", name: "Fieldname", header: "Header1", type: "string", isSC: true, isHC: true },
                                        { name: "name2", type: "string" },
                                        { name: "code", header: "Header3", type: "string", isSC: true}],
                                    viewConfig: {
                                        listeners: {
                                            itemdblclick: function (view, record) {
                                                Order_Form.getComponent("Grid").selModel.getSelection()[0].set("id", record.get("id"));
                                                Order_Form.getComponent("Grid").selModel.getSelection()[0].set("Fieldname", record.get("Fieldname"));
                                                Order_Form.getComponent("Grid").selModel.getSelection()[0].set("code", record.get("code"));
                                                trigger.setValue(record.get("name2"));
                                                this.up().up().destroy();
                                            }
                                        }
                                    },
                                    sorters: [{
                                        property: "code",
                                        direction: "ASC"
                                    }]
                                }).show(this, function () { this.getComponent(0).DMS_search(); Picker.getComponent(0).getView().refresh(); });
                            }
                        },
                        tpl: "<table class='Gridd' style='border-collapse: collapse; border: medium none;'><tr><td><b>[Header1]: </b></td><td style='width:100%;'>{Name2}</td></tr><tr><td><b>[Header3]: </b></td><td>{code}</td></tr></table>"

在选择表格中寻求帮助。

0 个答案:

没有答案