var obj = new AW.Grid.Extended;
obj.setCellText(function(i, j){return j + "." + i});
obj.setHeaderText(["header1", "header2", "header3", "header4", "header5", "header6", "header7", "header8", "header9", "header10"], 0);
obj.setHeaderCount(2);
obj.setFixedLeft(0);
obj.setColumnCount(10);
obj.setRowCount(100);
obj.onHeaderClicked = function(event, col, header) {
if (header == 1) {
var inp = new AW.UI.Input;
obj.setHeaderTemplate(inp, col, 1);
obj.getHeaderTemplate(col, 1).onControlEditEnded = function() {
var text = this.getControlText();
obj.setHeaderTemplate(new AW.Templates.ImageText, col, 1);
obj.setHeaderText(text, col, 1);
obj.getHeadersTemplate(1, "center").refresh();
}
obj.getHeadersTemplate(1, "center").refresh();
}
}
document.write(obj);
var inp = new AW.UI.Input;
obj.setHeaderTemplate(inp, col, 1);
obj.getHeaderTemplate(col, 1).onControlEditEnded = function() {
var text = this.getControlText();
obj.setHeaderTemplate(new AW.Grid.Header, col, 1);
obj.setHeaderText(text, col, 1);
obj.getHeaderTemplate(col, 1).refresh();
}
obj.getHeaderTemplate(col, 1).refresh();
var obj = new AW.Grid.Extended;
obj.setCellText(function(i, j){return j + "." + i});
obj.setHeaderText(["header1", "header2", "header3", "header4", "header5", "header6", "header7", "header8", "header9", "header10"], 0);
obj.setHeaderCount(2);
obj.setFixedLeft(0);
obj.setColumnCount(10);
obj.setRowCount(100);
obj.onHeaderClicked = function(event, col, header) {
if (header == 1) {
var inp = new AW.UI.Input;
obj.setHeaderTemplate(inp, col, 1);
obj.getHeaderTemplate(col, 1).onControlEditEnded = function() {
var text = this.getControlText();
obj.setHeaderTemplate(new AW.Grid.Header, col, 1);
obj.setHeaderText(text, col, 1);
obj.getHeaderTemplate(col, 1).refresh();
//obj.getHeadersTemplate(1, "center").refresh();
}
obj.getHeaderTemplate(col, 1).refresh();
//obj.getHeadersTemplate(1, "center").refresh();
obj.getHeaderTemplate(col, 1).focus();
}
}
document.write(obj);
var obj = new AW.Grid.Extended;
obj.setCellText(function(i, j){return j + "." + i});
obj.setHeaderText(["header1", "header2", "header3", "header4", "header5", "header6", "header7", "header8", "header9", "header10"], 0);
obj.setHeaderCount(2);
obj.setFixedLeft(0);
obj.setColumnCount(10);
obj.setRowCount(100);
obj.onHeaderClicked = function(event, col, header) {
if (header == 1) {
var combo = new AW.UI.Combo;
obj.setHeaderTemplate(combo, col, 1);
obj.getHeaderTemplate(col, 1).setItemText(["a", "b", "c", "d"]);
obj.getHeaderTemplate(col, 1).setItemCount(4);
obj.getHeaderTemplate(col, 1).onControlEditEnded = function() {
var text = this.getControlText();
obj.setHeaderTemplate(new AW.Grid.Header, col, 1);
obj.setHeaderText(text, col, 1);
obj.getHeaderTemplate(col, 1).refresh();
//obj.getHeadersTemplate(1, "center").refresh();
}
obj.getHeaderTemplate(col, 1).refresh();
//obj.getHeadersTemplate(1, "center").refresh();
obj.getHeaderTemplate(col, 1).focus();
}
}
document.write(obj);
var obj = new AW.Grid.Extended;
obj.setCellText(function(i, j){return j + "." + i});
obj.setHeaderText(["header1", "header2", "header3", "header4", "header5", "header6", "header7", "header8", "header9", "header10"], 0);
obj.setHeaderCount(2);
obj.setFixedLeft(0);
obj.setColumnCount(10);
obj.setRowCount(100);
obj.onHeaderClicked = function(event, col, header) {
if (header == 1) {
var inp = new AW.UI.Input;
obj.setHeaderTemplate(inp, col, 1);
obj.getHeaderTemplate(col, 1).onControlEditEnded = function() {
var text = this.getControlText();
obj.setHeaderTemplate(new AW.Grid.Header, col, 1);
obj.setHeaderText(text, col, 1);
var scrollLeft = obj.getViewTemplate("box", "top", "center").element().scrollLeft;
obj.getHeadersTemplate(1, "center").refresh();
obj.getViewTemplate("box", "top", "center").element().scrollLeft = scrollLeft;
}
var scrollLeft = obj.getViewTemplate("box", "top", "center").element().scrollLeft;
obj.getHeadersTemplate(1, "center").refresh();
obj.getViewTemplate("box", "top", "center").element().scrollLeft = scrollLeft;
obj.getHeaderTemplate(col, 1).focus();
}
}
document.write(obj);
var obj = new AW.Grid.Extended;
obj.setCellText(function(i, j){return j + "." + i});
obj.setHeaderText(["header1", "header2", "header3", "header4", "header5", "header6", "header7", "header8", "header9", "header10"], 0);
obj.setHeaderCount(2);
obj.setFixedLeft(0);
obj.setColumnCount(10);
obj.setRowCount(100);
obj.onHeaderClicked = function(event, col, header) {
if (header == 1) {
var combo = new AW.UI.Combo;
obj.setHeaderTemplate(combo, col, 1);
obj.getHeaderTemplate(col, 1).setItemText(["a", "b", "c", "d"]);
obj.getHeaderTemplate(col, 1).setItemCount(4);
obj.getHeaderTemplate(col, 1).onControlEditEnded = function() {
var text = this.getControlText();
obj.setHeaderTemplate(new AW.Grid.Header, col, 1);
obj.setHeaderText(text, col, 1);
var scrollLeft = obj.getViewTemplate("box", "top", "center").element().scrollLeft;
obj.getHeadersTemplate(1, "center").refresh();
obj.getViewTemplate("box", "top", "center").element().scrollLeft = scrollLeft;
}
var scrollLeft = obj.getViewTemplate("box", "top", "center").element().scrollLeft;
obj.getHeadersTemplate(1, "center").refresh();
obj.getViewTemplate("box", "top", "center").element().scrollLeft = scrollLeft;
obj.getHeaderTemplate(col, 1).focus();
}
}
document.write(obj);
This topic is archived.