:: Forum >>

combo in sub-header

Hi,

I'm trying to put a combo box in a sub-header, but am seeing problems both in FireFox and IE6.
Please see the grid at http://www.motreja.com/ankur/ActiveWidgets/example1.htm
This is running on the 2.0.1 evaluation version.

In IE6, I am unable to select a different value from the drop down list.
In FireFox too, I am unable to select a different value and further, the drop down list doesn't close.
I saw some messages about this on these forums, but http://www.activewidgets.com/general.bugs/2-0-0.html seems to indicate they are fixed.
Any solution will be appreciated.

Thanks,
Ankur
Ankur Motreja
Thursday, September 14, 2006
Hi,

I tried out a few more elements and it looks like the combo box, checkbox and the input text box have problems in both IE6 and FireFox when used in the sub-headers.
I have updated the same location (http://www.motreja.com/ankur/ActiveWidgets/example1.htm) with the new example.
The problems are as follows:

combo box: can't select a new value and drop down box doesn't close.
checkbox: doesn't become unchecked on click
input text box: can't focus on it to type in text

These happen in both FireFox and IE6.
Can anyone try loading the page in their browser and confirm ?

Thanks,
Ankur
Ankur Motreja
Thursday, September 14, 2006
Anyone ?
Any suggestion will be appreciated.

Thanks,
Ankur
Ankur Motreja
Thursday, September 14, 2006
I'm new to ActiveWidgets - but I think I have this working. Check out the code below and see if it works for you:

obj.setHeaderTemplate(combo2,1,1);
var list = new AW.UI.List;

list.setItemText(eval(str));
// list.setItemValue([1, 2, 3]);
list.setItemCount(3);

obj.setPopupTemplate(function(col, row) {
var grid = this;

list.onItemClicked = function(event, i){
var text = this.getItemText(i);
grid.setHeaderText(text, col, row);
grid.getHeaderTemplate(col, row).hidePopup();
grid.refresh();
}
return list;
});
Joel
Friday, September 15, 2006
BTW, the line:

list.setItemText(eval(str));

The str variable is simple a text string variable containing an array construct.

you can replace eval(str) with an array...
Joel
Friday, September 15, 2006
Hi,

Joel, setPopupTemplate() seems to work only for cells and not for headers.
But thanks for the suggestion.

I was using the onClick event incorrectly which was causing most of the problems.
After correcting that, the only remaining problems were that the combo box and the input box were not editable in the sub-headers.
The solution for this when using the combo box is at http://www.activewidgets.com/javascript.forum.16188.4/combo-uneditable-in-the-header.html
The same solution works for the input box too.

Thanks,
Ankur
Ankur Motreja
Thursday, September 21, 2006
Ankur,

Yes, we are working on the same thing and the thread you mention was my question. Glad that you got it working, but, additionally, the setpopuptemplate works in the header without a doubt - I've implemented it.
If you need the code, let me know and I'll be happy to post it.
Joel
Friday, September 22, 2006

This topic is archived.


Back to support forum

Forum search