3.2.0

Combo box template always visible in grid, ignores mouseover css

I have the following code on my page to put a combo box in the 1st column of the grid (in AW 2.5.5).

myGrid.setCellTemplate(new AW.Templates.Combo,1);
                var dl = ['Default Writer','Default Writer 2'];
                var dlist = new AW.UI.List;
                dlist.setItemText(dl);
                dlist.setItemCount(dl.length);
                myGrid.setPopupTemplate(dlist,1);
                myGrid.setCellEditable(true);

My problem is that the combo box is visible on the grid always, and also does not get highlighted as per the css:
.aw-mouseover-row {background-color:#ddf4ff;}
        .aw-mouseover-cell {background-color:#b7e7ff;}

You can select items and the popup list shows and disappears normally (i've seen lots of posts about that issue, just clarifying that this is not the same issue), but you always see the combo box, even when not editting the cell in question, rather than simply displaying the value that is currently chosen.

Mousing over the cells (or row) also do not change the color of the combo boxes, so I'm left with a column that looks distinctly different from all the rest of the grid (which uses the default cell templates).
John
December 23,
What I'm looking for is a way to make it only display the combo box when you click the cell to edit it, rather than have it always displayed - I think that would take care of the highlighting problem as well - but I don't know quite how to make it do that.

Any help is appreciated, and if there is a better way to do combo boxes in a grid than the AW.Templates.Combo + AW.UI.List, please point it out to me. I've gone over the examples and the forum and I haven't found anything with concrete working examples of the combo-in-cell, but it seems to be a basic enough request that I might have just missed it.
John
December 23,
Now that the holidays are over and maybe more people are looking at this these days... Any suggestions out there? This is still an issue, I've been avoiding it for the past month because I'm not sure how to do it.

Surely there is a way to make this happen? It seems too common of a request/problem for there not to be a solution.
John
January 26,
myGrid.setCellTemplate(new AW.Templates.Combo,1);
var dl = ['Default Writer','Default Writer 2'];
var dlist = new AW.UI.List;
dlist.setItemText(dl);
dlist.setItemCount(dl.length);
myGrid.setPopupTemplate(dlist,1);
myGrid.setCellEditable(true);
August 1,
So after much searching, is there a means to have a combo/drop-down in a grid that when the cell is clicked/focused for editing - that the combo is displayed, but not have the whole column showing combo boxes?

I see this has been asked in several posts - but the answers are either off-target or this particular issue is left unaddressed.

Tried a sample doublet code by Neo which didnt work for me.

Anyone have this working?
Ben W (ScheduleForce)
December 20,
I never did get it to work.

(And yes I am the same person who posted this a year ago.)
John
December 30,
I have made som progress on this since i posted on the 20th - in my case i was happy to add these style changes to the combo template which makes it look a little closer to what i desire:
grid.combo6 = new AW.Templates.Combo;
grid.combo6.setStyle("border", 0); 
grid.combo6.setStyle("background", "none"); 
grid.combo6.setStyle("color", "black"); 
grid.combo6.getContent('box').setStyle('border', '0px');

etc etc

I also do some style changes in the showPopup and hidePopup areas to style the combo similar to other fields when they are in edit mode.
Ben W (ScheduleForce)
December 30,

This topic is archived.

See also:


Back to support forum