:: Forum >>

Combo in Grid cell text is shifted up

Combo in the Grid was working great, but I did something to break it, just can't figure what that was. Each row can have either a Textbox or Combo, but now when the Combo cells lose focus, either by editing or by arrow keys. The Combo control appears to be "shifted up" inside the cell? Below is a link to an example image and my code for setting row templates, but thinking maybe a css issue?

Thanks for any ideas...

example: http://www.sketchdata.com/images/AW_dropdown.jpg

for (x=0;x<attrGrid.getRowCount();x++)
if (attrGrid.getCellText(12,x).length>0) {
     var dropdown = new AW.Templates.Combo;
     dropdown.setStyle('border', 'none');
     var itemdata = attrGrid.getCellText(12,x).split('|');
     var itemlist = new AW.UI.List;
     itemlist.setItemText(itemdata);
     itemlist.setItemCount(itemdata.length-1);
     attrGrid.setCellTemplate(dropdown, 15, x);
     attrGrid.setPopupTemplate(itemlist, 15, x);
     }
     else {
     attrGrid.setCellTemplate(new AW.Templates.Text, 15, x);
}
}



jmoore
Saturday, October 22, 2011
Just an update on my post, I was able to "almost" stop the shifting with the following two lines of code. Not sure if this is the best way? But it works.

attrGrid.setRowHeight(22);
dropdown.setStyle('height', '21 px');


jmoore
Sunday, October 23, 2011

This topic is archived.


Back to support forum

Forum search