-
1 Apr 2011 3:15 PM #1
How to get ext.grid column model from outside ext JS (jquery on click)
How to get ext.grid column model from outside ext JS (jquery on click)
Need hide/show column of ext grid, depending on external factors, not related to grid store.
Now i try simple thing:
Code:$(document).ready(function(){ // =================== hide column/show column ======================== function show_announce() { Ext.namespace('Ext.ux'); Ext.namespace('Ext.ux.form'); // $.log( Ext.grid.getColumnModel() ); // $.log( grid.getColumnModel() ); // $.log( Ext.ux.grid.getColumnModel() ); $.log( grid.getColumnModel() ); } // =================== $( "#test-test" ) . click( function(){ show_announce(); return false; }); });
But every variant of call this column model i try:
Ext.grid.getColumnModel()
grid.getColumnModel()
Ext.ux.grid.getColumnModel()
grid.getColumnModel()
is incorrect.
But, i can reload store from this same function with store.reload();
Dear developers and EXT users!
Please help me to hide or show column from JS.
Or get column model of extjs grid is inided and is active!
Arsen
-
1 Apr 2011 3:31 PM #2
it was global scope problemm of column model & grid vars. Both must be in glob.scope, ie without vars ...
So then start working
pls delete this ...
-
3 Oct 2011 11:04 PM #3
On clickin of leaf node of tree.Panel need to hide and show diff. grids?
On clickin of leaf node of tree.Panel need to hide and show diff. grids?
hey guys help me out...........
I have two grids with diff. column names n diff. forms for them and I want to make the grids hide() and show() when I click on tree.Panel......leaf nodes.......
like I have two leaf nodes under Admin that is : bulletin_users for grid1
and announcements for grid2
So I want wen i click on bulletin_users the grid1 should be visible with its respective toolbar in the ContentPanel and the grid2 should be hidden with its respective toolbar.........and viceversa wen I click on announcements
tell me the code which I should put into the listeners of TreePanel.
-
4 Oct 2011 4:17 AM #4
Hello,
Ive used xtemplate to generate the html. Setting the id/class within the xtemplate that jquery will then access when the onclick is accessed.
-
4 Oct 2011 4:33 AM #5
Hey can U give me the code like how to use it actually M just a beginner and I searched for it but not getting how to apply in my code
-
4 Oct 2011 5:50 AM #6
Im not in a position to get it for you now, but check this link out. It is kinda along the same thingy ...
http://demo.superdit.com/ext_listview_dataview/
Basically, your just building an html table with the xtemplate, then you access the id(s)/classes using jquery ...
Hope this helps.
Similar Threads
-
Open a Model window with the details of the Grid Row when I click the grid row
By shonekolathu in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 11 Jan 2011, 1:47 PM -
Grid Column Model
By tutankamen in forum Ext 3.x: Help & DiscussionReplies: 1Last Post: 13 Jan 2010, 4:14 AM -
Ext js 2.0 ( How to get a checkbox in grid column model
By cprabha in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 31 Jul 2008, 6:07 AM


Reply With Quote