-
15 Dec 2009 1:37 AM #41
Hi maxim,
Bbut i guess the root title is not supposed to come above the header right(i have seen your examples and it is not coming above header) please let me know if you have any idea where i might have went wrong.
On the second problem i want all the trees to be expanded when the grid is shown, so i am using autoExpandColumn config, but the trees are not epanded.
Thanks in advance
harsha
-
18 Dec 2009 2:30 PM #42
Hi!
I really like your EditorGrid Extention, exactly what I need :-)
But I'm facing some problems using the EditorGrid with the AdjustancyListStore, here's the problem: http://screencast.com/t/NmM5YmQ1Nj
Any ideas on that?
And the extention seems to have an bug when using the tbar an error thrown:
uncaught exception: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER)" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: http://mydomain.com/ext-all-debug.js :: anonymous :: line 21688" data: no]
thx
Dumas
-
22 Dec 2009 2:13 AM #43
Hi Dumas.
Nice screencast. I think you are facing the problems due to your top level nodes has 'parent' field set to "null" which is a string value, but it should be just null without quotesUse the force - read the source.
My ExtJS extensions can be found here: http://max-bazhenov.com/dev/
-
22 Dec 2009 2:18 AM #44
Hi Harsha.
I think you have seen the examples of the treegrid for ExtJS version 3.x, they don't have the breadcrumbs facility. I've decided to get rid of that after I've ported my extension to work with ExtJS 3.x.
This config property doesn't control the expansion of tree grid, it controls the horizontal expansion of a column. If you want some treegrid nodes to be expanded upon loading then you have to do it manually using store's expandNode/collapseNode methods.Use the force - read the source.
My ExtJS extensions can be found here: http://max-bazhenov.com/dev/
-
25 Dec 2009 4:17 PM #45
MaximGB, Thanks for the great extension!!!

Would you please help me with this problem... I attempt send data via Direct...
Read (load) and update requests work ok. But remove(destroy) and add(create) requests not present.. i catch events only. Many events add/remove fired on expandAll method, but no one request to server... How i can use direct with TreeGrid? May be use it without crud - call create and destroy from handlers?
Sorry for my bad English...
Code:recordNomkStore = Ext.data.Record.create([ {name: 'name', type: 'string'}, {name: 'cod', type: 'string'}, {name: 'comment', type: 'string'}, {name: '_id', type: 'int'}, {name: '_parent', type: 'auto'}, {name: '_is_leaf', type: 'bool'} ]); dsNomkStore = new Ext.ux.maximgb.tg.AdjacencyListStore({ id: 'dsNomk' // ,restful: true ,autoLoad: true ,autoSave: true // ,paramsAsHash: false ,api: { create: TreeNomks.create, read: TreeNomks.read, update: TreeNomks.update, destroy: TreeNomks.destroy } ,reader: new Ext.data.JsonReader({ idProperty:'_id',root:'root' }, recordNomkStore ) ,writer: new Ext.data.JsonWriter({ encode: false }) });Code:Ext.ns('NomkTreeGrid'); NomkTreeGrid = Ext.extend(Ext.ux.maximgb.tg.EditorGridPanel, { // border:false constructor:function(config) { config = config || {}; config.listeners = config.listeners || {}; Ext.applyIf(config.listeners, { beforeedit: function(e){ if ( !e.record.get('_is_leaf') && ( e.field != 'name' ) ) return false; } }); NomkTreeGrid.superclass.constructor.call(this, config); } // eo function constructor ,initComponent:function() { var config = { tbar: [{ text: 'Добавить', scope: this, handler: function(){ var sm = this.getSelectionModel(); var r = sm.getSelected(); if ( !r || r.get("_is_leaf") ){ Ext.MessageBox.alert( 'Сообщение', 'Выбирите группу к которой хотите добавить новую запись...' ); return; } this.store.expandNode(r); childID = Ext.id(); var newRecord = new recordNomkStore({ name: "Child " + childID, _id: childID, _is_leaf: true, _parent: r.get("_id") }, childID ); this.store.addSorted( newRecord ); sm.selectRecords([newRecord]); } }, { text: 'Удалить', scope: this, handler: function(){ var s = this.getSelectionModel().getSelections(); for(var i = 0, r; r = s[i]; i++){ this.store.remove(r); } } }], title: 'Номенклатура', store: dsNomkStore, master_column_id : 'name', // plugins: [ _getRowEditor() ], sm: new Ext.grid.RowSelectionModel(), columns: [{ id:'name', header: "Наименование", width: 400, sortable: true, dataIndex: 'name' ,editor: new Ext.form.TextField() },{ header: "Примечание", width: 400, sortable: true, dataIndex: 'comment' ,editor: new Ext.form.TextField() }] ,stripeRows: true // ,autoExpandColumn: 'name' ,viewConfig: { forceFit : true, enableRowBody : true } }; // eo config object Ext.apply(this, Ext.apply(this.initialConfig, config)); NomkTreeGrid.superclass.initComponent.apply(this, arguments); } // eo function initComponent ,onRender:function() { NomkTreeGrid.superclass.onRender.apply(this, arguments); } // eo function onRender }); // eo extend Ext.reg('NomkTreeGrid', NomkTreeGrid);A posse ad esse non válet consequentia
-
27 Dec 2009 9:00 PM #46
performance of the maximgb treegrid for ext3.0
performance of the maximgb treegrid for ext3.0
I changed my code from ext 2.3 to 3.0,so I also changed the treegrid. And I found the bug,if I have a node with 100 children nodes,the node can't load normaly after the js client recieved the json data from the server. But in the version of treegrid for ext2.x,there is no the problem and the node can fastly load 100 children nodes .
Who can help me?
-
4 Jan 2010 8:04 PM #47
Hi!
I'm facing a problem using the tg.EditorGridPanel with the AdjustancyListStore (which extends the AbstractTreeStore which extends the Ext.data.DirectStore). I tried to write an addRecord function, but it doesn't work
For details it's much easier to see the problem in a screencast: http://screencast.com/t/YzA2MTIxZ
Can anybody help me?
thx
Dumas
-
17 Feb 2010 11:33 AM #48
This extension looks great - but when I expand a node in my code the rows are added at the end - not under the parent node. Collapsing the node removes them, but they remain at the end of the table, not under the appropriate parent row.
Any ideas?
Rich
-
17 Feb 2010 11:46 AM #49
Ok - turns out - I am using parent id == 0 for root nodes, but the comparison to null fails in the store. SO I made this change:
Code:Ext.ux.maximgb.tg.AdjacencyListStore = Ext.extend(Ext.ux.maximgb.tg.AbstractTreeStore, { /** * @cfg {String} parent_id_field_name Record parent id field name. */ parent_id_field_name : '_parent', root_node_value: null, // <-- Added getRootNodes : function() { var i, len, result = [], records = this.data.getRange(); for (i = 0, len = records.length; i < len; i++) { if (records[i].get(this.parent_id_field_name) == this.root_node_value) { // <-- Changed result.push(records[i]); } } return result; },
-
8 Mar 2010 5:19 PM #50
Hi,
Is the latest version on your download side compatible with 3.1.1? I'm trying to upgrade my app to 3.1.1 and the TreeGrid using an AdjacencyListStore renders and works correctly. But previously I was using Saki's Ext.ux.GridSearch plugin with TreeGrid without a problem (since TreeGrid was extending Grid I had no problems). And it's a lifesaver when trying to quickly locate an item on the grid.
But with 3.1.1 it doesn't work. In my app I don't get any exceptions but I also don't see the filtered result from the plugin. I checked the plugin first and it works OK with other grids. And I also checked the filtered result from the plugin for TreeGrid and I verified that the store filter correctly finds the matching rows. But as I said they don't appear on TreeGrid which was working perfectly before.
Thanks in advance



Reply With Quote