Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ti LH on Aug 30, 2009 19:57
open dhtmlx forum
wrapping grid sub_row

I have text in a sub_row that extends beyond the grid.
How to enable wrap on it ?
mygrid.enableMultiline(true) does not seem to work.
Answer posted by dhxSupport on Aug 31, 2009 01:57
Wrapping is enabled in the sub row by default. Can you please provide us screen shot where sub row extends beyond the grid? 
Answer posted by Ti LH on Aug 31, 2009 03:00

 

            mygrid = new dhtmlXGridObject('transGrid');
            mygrid.setImagePath("scripts/dhtmlxGrid/codebase/imgs/");
            mygrid.setHeader("Remarks,Approvals,Action,Date,Name,Man Days",null,
            ["text-align:center;","text-align:center;","text-align:center","text-align:center"]);
            mygrid.setInitWidths("60,100,100,110,200,70")
            mygrid.setColAlign("center,center,center,center,left,center")
            mygrid.setColTypes("sub_row,ro,ro,ro,ro,ro");
            mygrid.enableAutoHeight(true)
            mygrid.enableMultiline(true);
            mygrid.init();

            mygrid.enableBlockSelection(true);
            mygrid.attachEvent("onKeyPress",function (code,ctrl,shift){
                if(code==67&&ctrl){
                    mygrid.copyBlockToClipboard()
                }
                return true;
            }
        );

            mygrid.setSkin("modern");
            mygrid.preventIECaching(true);
            mygrid.loadXMLString("<?xml version='1.0'?><rows><row id='1'><cell>Awaiting response from&lt;li&gt;HOD : either xxxxxxx&lt;/li&gt;</cell><cell>HOD/System Owner Approved</cell><cell>Pending</cell><cell></cell><cell></cell><cell></cell></row><row id='2'><cell>start12345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890 end</cell><cell>HOD/System Owner Approved</cell><cell>Approve</cell><cell>24-Aug-2009 13:40</cell><cell>yyyyy</cell><cell></cell></row></rows>")
       

Attachments (1)
grid.png7.14 Kb
Answer posted by Ti LH on Sep 02, 2009 19:07
Any solution ?
Answer posted by Ti LH on Sep 02, 2009 19:42

div.dhx_sub_row {
    white-space:normal;
}
solves the problem