-
29 Dec 2010 5:32 AM #1
Row Expander - Onclick of the row
Row Expander - Onclick of the row
Hi,
I have implemented Ext.grid.RowExpander for a grid. However the row expands only when the (+) is clicked. However my requirement is that i need to expand the row when user clicks on the row. Also i don't want the (+) to appear.
I am new to Extjs, would you be able to help!
Thanks
pbban
-
29 Dec 2010 5:40 AM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
It already does that on 'rowdblclick'. You can modify the RowExpander.onRender method so it also does that on 'rowclick'.
-
29 Dec 2010 6:20 AM #3
-
29 Dec 2010 6:45 AM #4Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
Yes, Ext 2.3.0 didn't support that yet.
You could change:
Code:Ext.override(Ext.grid.RowExpander, { init : function(grid){ this.grid = grid; var view = grid.getView(); view.getRowClass = this.getRowClass.createDelegate(this); view.enableRowBody = true; grid.on('render', function(){ //view.mainBody.on('mousedown', this.onMouseDown, this); grid.on('rowclick', this.onRowClick, this); }, this); }, onRowClick: function(grid, rowIndex, e) { this.toggleRow(rowIndex); } });
-
30 Dec 2010 4:07 AM #5
Hi,
Thanks for your reply. I am considering upgrading to Extjs 3.3.0 and have downloaded the same. However not able to find the RowExpander.js file in the directory structure.
Would you be able to help me with the location for RowExpander.js
Thanks
Parag
-
30 Dec 2010 4:15 AM #6Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
Code:examples/ux/RowExpander.js
-
30 Dec 2010 4:17 AM #7
-
30 Dec 2010 5:16 AM #8
-
30 Dec 2010 6:02 AM #9Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
You can remove the image with CSS:
or you could configure the entire expander with:Code:.x-grid3-row-expander { background: transparent; }
Code:hidden:true
Similar Threads
-
Row Expander - expand 1st row by default
By deanoj in forum Ext 2.x: Help & DiscussionReplies: 6Last Post: 13 Aug 2009, 8:12 AM -
Grid + Row Expander + One Row at a time
By Brat.Pidd in forum Ext 2.x: Help & DiscussionReplies: 5Last Post: 12 May 2009, 1:22 AM -
row expander
By tunaboo in forum Ext 2.x: Help & DiscussionReplies: 7Last Post: 11 Jan 2008, 12:39 PM


Reply With Quote
