-
10 May 2007 12:41 PM #1
Extjs Grid cell click for popup window
Extjs Grid cell click for popup window
Hi All,
I have got requirement like i have loaded my Ext grid with data. When i click on the perticular cell i should open window.showmodeldialog with that cell data to the popup and i can change that record data and i should refresh the parent grid for the updated data once i saved the popup data.
How to write the event to select the cell or column similar to
grid.on('click', this.gridSelectionHandler, this);
I will appriciate your early response as i need to finish this task early for the tommorow release.
Thanks,
Srikanth
-
10 May 2007 1:11 PM #2
There are examples of this in the forum. You'll have to search. Also, please stop asking for quick responses - nobody here is obligated to help you meet your deadlines. The community will help when they have time and answers.
Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
27 Apr 2009 7:55 AM #3
-
27 Apr 2009 8:19 AM #4Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
17 Jan 2010 1:39 AM #5
sample on
sample on
here sample
Code:grid.on({ 'click' : { fn: this.prueba, scope: this } });
-
30 Jan 2012 11:08 PM #6
Solution:
Solution:
It is simple:
1. Create a action column, specify handler function on that, ensure that handler has all the parameters including event parameter. It would be 5th parameter in order. i.e. function(a,b,c,d,event)
2. Use event methods getXY, getX and getY
3. Create a global popup variable. Define it before the class defination.
i.e.
var popup;
Ext.define().....
4. Then create popup component
eg:- popup = Ext.create(Ext.Component.....)
4. popup.setPosition(event.getX(),event.getY()) and popup.show()
-
5 Mar 2012 2:29 AM #7
Grid Cell Click popup
Grid Cell Click popup
Hello.
Do you know another solution for do that...?
-
16 May 2012 11:45 AM #8
CellClick Solution for Ext 4
CellClick Solution for Ext 4
In your grid constructor code:
Then put in these methods in your grid:Code:this.on({cellclick: { fn:this.showPopup, scope: this });Code:showPopup: function (grid,td,cellIndex,record,tr,rowIndex,e,eOpts) { var columnIndex = this.getColumnIndex(grid, 'YourCellColumnNameThatYouWantClicked'); if (cellIndex == columnIndex) { //you have a match...do your popup code here } }, getColumnIndex: function (grid, dataIndex) { var gridColumns = grid.headerCt.getGridColumns(); for (var i = 0; i < gridColumns.length; i++) { if (gridColumns[i].dataIndex == dataIndex) { return i; } } }
-
16 May 2012 11:55 AM #9
cell click
cell click
sorry that code came out on one line! Don't know why...
-
7 May 2013 11:20 PM #10
How to open different popup window for each cell?
My each cell will have its custom component, i need to open popup window how can i achieve tht ?


Reply With Quote