3.2.0

List in grid - how to know when value selected and updated?

I am making some changes to a web site which uses an AW grid.

I am not familiar with AW but have been going through this website to try and learn how to make the required changes.

The changes required are:

There is a display only grid on a page. I need to make it so that one of the cells can be editable using a list box. When this list box is changed I need to write the changed data back to the database.

So far I have figured out how to put the list box on the grid and populate it with possible values and get the current value from the database.

My questions are:

1) Can someone give me some sample code or point me to a link on how to write back the data when the list box is changed or at least tell me what the event syntax would be?

2) How can I change the size of the list box so that it contains the possible values and is not so big?

3) How can I make it so that grid rows cannot be selected? I tried adding obj.setAction("selectRow", null); and obj.setEvent("onkeydown", null); but the setAction causes the grid not to be displayed at all.

Thanks!
John
February 28,
Check this post regarding row selection -

http://www.activewidgets.com/javascript.forum.22070.2/cancel-row-clicks-and-changes.html

When you say 'list box' - what exactly do you mean? AW.Templates.Combo class or something else?
Alex (ActiveWidgets)
February 29,
I used this code to generate the 'list' box:

var myItems = ["1-4 weeks", "3 months", "6 months", "12 months+"];
function itemText(i){
var col = this.$0;
var row = this.$1;
return myItems[i];
}
function itemCount(){
return myItems.length;
}
var list = new AW.UI.List;
list.setItemText(itemText);
list.setItemCount(itemCount);
obj.setCellTemplate(new AW.Templates.Combo, 7);
obj.setPopupTemplate(list, 7);
John
March 2,

This topic is archived.

See also:


Back to support forum