PDA

View Full Version : Extjs3.4 cell editor is not giving proper view



Manoj Parida
25 Oct 2013, 1:34 AM
Hi All,
I have used editor in grid (cell editor of type textfield ). If the text entered is long then it was not showing the complete data and just showing the eclipses. by adding the css
.x-grid3-cell-inner, .x-grid3-hd-inner {
white-space: normal; /* changed from nowrap */
height : auto !important;
} now it is fine.

My problem is now clicking on the cell it is showing the text field in the first line ( default height taking as 16 px).

In order to resolve i tried with registering the focus event.
listeners:
focus:
fn: >
^function( comp ) {
var grid = Ext.getCmp('my-grid');
var selectedRec = grid.getSelectionModel().getSelections()[0];
var rowIndex = grid.getStore().indexOf(selectedRec);
var cellHeight = Ext.get(grid.getView().getRow(rowIndex)).getHeight (); // here height is giving as expected
var cellWidth = Ext.get(grid.getView().getRow(rowIndex)).getWidth( );
comp.el.dom.setAttribute("style", "height : "+cellHeight+"px !important");
// comp.el.dom.setAttribute("style", "width : 550px !important");
console.log(cellHeight, this);
}
with this the width is getting changed
If I'm setting any width then it is ignoring the height property

Can anybody have idea about this ?


Thanks
Manoj Parida

willigogs
25 Oct 2013, 4:17 AM
Can you provide a code example of what you have created so far?