Image in cell

Hello support,



I have image in cell. On clicking the image cell(on edit mode), I am displaying Image Name.

The height cell is calculated as per the image height, Now when I click on the cell the height of cell goes back to normal/default height.

But when I came out of cell, Here again the image is displayed so cell gets the correct height.



1. I just dont want to shrink the cell/row height when the cell is in edit mode.



2. Is there any grid function, which sets the correct row height dynamically just like adjustColumnSize().



3. Can we change the row height dynamically like we do for column by just dragging?



Thanks

>>1. I just dont want to shrink the cell/row height when the cell is in edit mode.


If you are using multiline mode - height of row will be preserved in edit state ( sample attached )
In case of normal mode, such behavior can be achieved only by code modification.

>>2. Is there any grid function, which sets the correct row height dynamically just like adjustColumnSize()
If you are using multiline mode
    grid.enableMultiline(true);
the height of row must be autosized by content ( you need not any additional calls in such case )

>>3. Can we change the row height dynamically like we do for column by just dragging?

It is not possible.  Grid can work in two modes
a) normal - height of row fixed
b) multiline - height of row adjusted to inner content



1209733869.zip (97.6 KB)

Thanks
I am using normal mode.
So which code needs to be modified?

dhtmlxgridcell.js , line 387
function eXcell_ed(cell){
    …
    this.cell.atag=((!this.grid.multiLine)&&(_isKHTML||_isMacOS||_isFF)) ? “INPUT” : “TEXTAREA”;

can be updated as

    this.cell.atag=“TEXTAREA”;
       

Thanks.
Now I am able to preserve the row height.
1. But when I delete image from the cell, row still have same height as when cell with image.

2.
I am providing the user to break the line, internally
tag is added at the position where user want to break the line.
I have two frozen columns(not editable) at left part, when user breaks the line the row height of right part of grid changes, but left part is not.
why left part and right part is not in synch?
How to make right part and left part row heights in synch with each other?

1. But when I delete image from the cell, row still have same height as when cell with image.
If you need dynamic row height the only stable way - use multiline mode.

>>why left part and right part is not in synch?
The grid can correctly sync sizes of rows in splitted grid only in multiline mode. In normal mode grid expects that heights of rows are fixed, so it not running any sync. height code.