Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Swapnil Deshmukh on Dec 16, 2008 06:38
open dhtmlx forum
Gap between image and text in dhtmlxTreeGrid

Dear Sir/Madam,

I am usning the dhtmlxTreeGrid, where first column type is tree and I am using the image and text in the cell. But I would like to have the space (at least 5px) between text and image. Now they are very close. Please give me solution ASAP.

Thanks,
Swapnil
Answer posted by Support on Dec 16, 2008 08:17
You can add next style to the page

<style type="text/css" media="screen">
 .gridbox td span{
  padding-left:5px;
 }
</style>

Answer posted by Swapnil Deshmukh on Dec 16, 2008 22:57
Hi,
 
Thanks for quick solution and its working well.
 
I need another quick solution on the Word wrapping in TreeGrid cells

is there a way to wrap text in a treeGrid cell of type 'tree'

for example. i have a cell that is approx 400px in width and i have text that is longer than that, i want the height of the cell to expand and create rows out of the text, so instead of appearing on 1 line it appears on 2 or more (depending on how many it needs) and image in cell should be appare at the first line of the text.

is this possible?
 
I used grid.enableMultiline(true);  for multi lines but its not working for cell type tree.

thanks
Answer posted by Support on Dec 17, 2008 03:13
TreeGrid cell has a complex content inside, so it not purposed for multi-line data.
While it possible to force multi-line behavior it will look ugly - can be done by adding 
<style type="text/css" media="screen">
 .gridbox td span{
    padding-left:5px;
    white-space : normal;
 }
</style>


Answer posted by Swapnil Deshmukh on Dec 17, 2008 04:05

Thanks for quick reply

I already tried that in my code, it wrapping the text to next line, but it not adjusting the height of cell or row. It showing only first row. And when I  trying to edit cell the text box pushed to left side. Please help me and send sample code if possible.

 

Thanks,

Swapnil

Answer posted by Support on Dec 17, 2008 06:03
Sample sent by email. 
>>And when I trying to edit cell the text box pushed to left side.
It will not look really good in any case , existing design purposed for sinle line mode only.