Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by ymikhel on Jun 10, 2008 05:02
open dhtmlx forum
Resizing dynamic columns to fix content width - Part III

Hi,

Looking for answers to the questions asked here (http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=3617)
I have tried to use "%" instead of "px" for columns width, but the grid continues to think that it's pixel values
and draws columns having 20px width. How to make it read columns width values as percentage?
(I have tried "*" instead of "20" for the last column - same result)

<?xml version="1.0" encoding="UTF-8"?>
<rows>
    <head>
        <column align="center" id="E_DATE" sort="date" type="ro" width="20"><![CDATA[Date]]></column>
        <column align="center" id="E_CODE" sort="str" type="ro" width="20"><![CDATA[Error Code]]></column>
        <column align="center" id="E_DESC" sort="str" type="ro" width="20"><![CDATA[Description]]></column>
        <column align="center" id="E_REPORTER" sort="str" type="ro" width="20"><![CDATA[Reporter]]></column>
        <column align="center" id="E_SERVER" sort="str" type="ro" width="20"><![CDATA[Server]]></column>
    </head>
    <settings>
        <colwidth>%</colwidth>
    </settings>
    <beforeInit>
        <call command="enableResizing">
            <param>true</param>
            <param>true</param>
            <param>true</param>
            <param>true</param>
            <param>true</param>
        </call>
    </beforeInit>
    <afterInit>
        <call command="adjustColumnSize">
            <param>0</param>
        </call>
        <call command="adjustColumnSize">
            <param>1</param>
        </call>
        <call command="adjustColumnSize">
            <param>2</param>
        </call>
        <call command="adjustColumnSize">
            <param>3</param>
        </call>
        <call command="adjustColumnSize">
            <param>4</param>
        </call>
    </afterInit>
    <row id="341">
        <cell id="E_CODE"><![CDATA[RE-0004]]></cell>
        <cell id="E_DATE"><![CDATA[05/20/2008 11:34]]></cell>
        <cell id="E_DESC"><![CDATA[Some data]]></cell>
        <cell id="E_REPORTER"><![CDATA[Some data]]></cell>
        <cell id="E_SERVER"><![CDATA[Some data]]></cell>
    </row>
</rows>

Regards,
Yuri Mikhel
Answer posted by Support on Jun 10, 2008 09:08