input box in panel with editable grid
Hi,
I have a panel in an editable grid.
The panel contains an input text box.
Now, if I click on the input box and start typing, instead of the text appearing in the input box, the current grid cell goes into edit mode and the text appears there.
Alex, do you have a solution to this issue ?
Sample code is given below.
Thanks,
Ankur
I have a panel in an editable grid.
The panel contains an input text box.
Now, if I click on the input box and start typing, instead of the text appearing in the input box, the current grid cell goes into edit mode and the text appears there.
Alex, do you have a solution to this issue ?
Sample code is given below.
Thanks,
Ankur
<html>
<head>
<script src="activewidgets/runtime/lib/aw.js"></script>
<link href="activewidgets/runtime/styles/xp/aw.css" rel="stylesheet"></link>
</head>
<body>
<script>
var obj = new AW.Grid.Extended;
obj.setCellText(function(i, j){return j + "." + i});
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(100);
obj.setCellEditable(true);
var toolbar = new AW.HTML.DIV;
toolbar.setId("toolbar");
var inp = new AW.UI.Input;
inp.setControlText("a");
toolbar.setContent("input", inp);
obj.defineTemplate("bottomLine", toolbar);
obj.setLayoutTemplate(new AW.Panels.Horizontal);
obj.setPanelTemplate(function(i){
switch(i){
case 1: return this.getScrollTemplate();
case 2: return this.getBottomLineTemplate();
}
});
obj.setPanelHeight(23, 2); //bottom line
document.write(obj);
</script>
</body>
</html>
Ankur Motreja
December 2,