Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Richard White on Sep 24, 2007 20:29
open dhtmlx forum
dhtmlxTreeGrid Combo

Hi,

we have set up a treegrid with one of the columns as 'co' for combo. we have assigned a combo box to it but when we click on this column on the interface the combo box does not display underneath where we click - it displays at the bottom of the page (outside of the div line)

we would be grateful if you could tell us why it is doing this. Thanks

the code is as follows:

<link rel="STYLESHEET" type="text/css" href="dhtmlXGrid.css?v=1.4-70712">
<link rel="stylesheet" type="text/css" href="/Portex/dhtmlxTreeGrid/css/dhtmlXGrid_skins.css?v=1.4-70712">

<script src="/Portex/dhtmlxTreeGrid/js/dhtmlXCommon.js?v=1.4-70712"></script>
<script src="/Portex/dhtmlxTreeGrid/js/dhtmlXGrid.js?v=1.4-70712"></script>
<script src="/Portex/dhtmlxTreeGrid/js/dhtmlXGridCell.js?v=1.4-70712"></script>
<script src="/Portex/dhtmlxTreeGrid/js/dhtmlXTreeGrid.js?v=1.4-70712"></script>

<div align="center" id="gridbox" style="width:100%; height:100%"></div>

<script type="text/javascript">

mygrid = new dhtmlXGridObject('gridbox');
    mygrid.selMultiRows = true;
    mygrid.imgURL = "/Portex/dhtmlxTreeGrid/imgs/";
    mygrid.setHeader("Manage Questions,Question Details,#cspan,#cspan");
    mygrid.attachHeader("#rspan,Price,Cover,Ships in");
    mygrid.setInitWidths("205,200,200,200");
    mygrid.setColAlign("left,left,left,left");
    mygrid.setColTypes("tree,co,ed,txt");
    mygrid.setSkin("modern");
    mygrid.setColumnColor("white,#def7ff,white,#def7ff");
    var combobox = mygrid.getCombo(1);
     combobox.put("1","1 Hour");
     combobox.put("12","12 Hours");
     combobox.put("24","24 Hours");
     combobox.put("48","2 days");
     combobox.put("168","1 week");
     combobox.put("pick","pick up");
     combobox.put("na","na");
    mygrid.init();
    mygrid.addRow("a",['Questions','a','b','c'],null, null,'question.bmp');

</script>

Thanks

Richard


Answer posted by Stanislav on Sep 25, 2007 13:52
I'm unsure, but think that problem caused by absolute positioning of grid container.
Combobox calculates its position through chain of parent objects, and if any of them has absolute positioning - result will be incorrect.

Also , such situation possible if you are using old|incorrect css file, please be sure that used css file include next rule

.dhx_combo_select{
    font-family:arial;
    font-size:12px;
    border:1px solid;
    border-color:black silver silver black;
    background-color:white;
    overflow:hidden;
    cursor:default;
    position:absolute;
    height:auto;
}


Answer posted on Sep 25, 2007 18:03
Hi,

this is not working. we only have 1 div, and we have tried to create a basic table. it keeps coming outside of the div, even if we set a zindex, and we have made sure that the code you gave me is in the css file correctly.

we are currently evaluating the software and want to purchase this if we can sort this issue out.

please advice again

thanks
Answer posted on Sep 25, 2007 18:31
Please, send any kind of sample where problem can be reconstructed to  dhtmlx@scand.com  or attach here, because it quite impossible to solve issue without way to reconstruct it.
Answer posted by Richard White on Sep 27, 2007 22:59
my fault, i made a silly error :)

<link rel="STYLESHEET" type="text/css" href="dhtmlXGrid.css?v=1.4-70712">  doesnt have the same path as the other includes - i redirected and it works fine now

ooops, thanks for your help - its the little things in programming that takes always take the longest to fix!!!