I used to mix some features to do it.
But you can make your own simplifyed/complex version.
Just insert a call to the server ajax/asp/vbs ... code inside the SearchFunction.
HTH
<script>
var lastcol;
var lastrow;
var isanyddvisible = false;
var lastTopPos;
var lastLeftPos;
var DDCELLCLICKED = false;
var objAC = new AW.UI.Grid;
objAC.setCellData(function(col, row){return col + "." + row });
objAC.setHeaderText("header");
objAC.setStyle("width", '130');
objAC.setStyle("height", '100%');
objAC.setVirtualMode(false);
objAC.setCellEditable(false);
objAC.getRowsTemplate().setStyle('background', 'lightyellow');
objAC.setColumnCount(1);
objAC.setRowCount(140);
objAC.onCellClicked = function(event, column, row){
DDCELLCLICKED = true;
obj.onCellClicked();
obj.setCellText(this.getCellText(column,row), lastcol,lastrow);
obj.getCellTemplate(lastcol,lastrow).refresh();
}
var objtextarea = new AW.HTML.DIV;
objtextarea.setStyle("height", "180");
objtextarea.setStyle("POSITION", "ABSOLUTE");
objtextarea.setStyle("Z-INDEX", "1000000000");
objtextarea.setStyle("display", "none") ;
objtextarea.setContent("text", objAC.toString());
document.write(objtextarea);
var obj = new AW.UI.Grid;
obj.setCellData(function(col, row){return col + "." + row});
obj.setHeaderText("header");
obj.setVirtualMode(false);
obj.setCellEditable(true);
obj.setColumnCount(6);
obj.setRowCount(10);
obj.onScrollTopChanged = function(top){
if(isanyddvisible){ if (top != lastTopPos){ return "obj.setScrollTop(lastTopPos)" } }
}
obj.onScrollTopError = function(error){ eval(error); }
obj.onScrollLeftChanged = function(left){
if(isanyddvisible){ if (left != lastLeftPos){ return "obj.setScrollLeft(lastLeftPos)" } }
}
obj.onScrollLeftError = function(error){ eval(error); }
obj.onCellClicked = function(event, column, row){
if( isanyddvisible ) {
objtextarea.setStyle("display", "none") ;
isanyddvisible = false;
obj.setScrollTop( lastTopPos );
obj.setScrollLeft( lastLeftPos );
}
}
obj.onCellTextChanged = function(event, column, row){
if( !DDCELLCLICKED ) {
SearchFunction( column,row);
objAC.getRowsTemplate().refresh();
}
}
obj.onCellEditStarted = function(event, column, row){
lastTopPos = obj.getScrollTop();
lastLeftPos = obj.getScrollLeft();
isanyddvisible = true;
var el = obj.getCellTemplate(column, row).element();
if(!AW.ie) {
objtextarea.setStyle("left", AW.getLeft(el) - obj.getScrollLeft() );
objtextarea.setStyle("top", AW.getTop(el) - obj.getScrollTop() + el.offsetHeight );
}
else{
objtextarea.setStyle("left", AW.getLeft(el) - 2 );
objtextarea.setStyle("top", AW.getTop(el) - 3 + el.offsetHeight );
}
objtextarea.setStyle("display", "block") ;
objAC.raiseEvent("adjustScrollHeight");
objAC.refresh();
lastcol=column;
lastrow=row;
SearchFunction( lastcol,lastrow);
}
function SearchFunction(col,row){
objAC.setRowCount( 0 ) ;
objtextarea.setStyle("height", "29");
objAC.setHeaderText('Loading...' ,0);
objAC.refresh();
var tosearch = obj.getCellText(col, row).toUpperCase();
var rows = [], max = 140;
if(tosearch.length < 3){
objAC.setHeaderText('3 chars min' ,0);
objAC.refresh();
}
else{
if(tosearch != '' ){
for (var i=0; i<max; i++){
var cellval = objAC.getCellText(0, i);
if ( cellval.toUpperCase().substr(0, tosearch.length) == tosearch.substr(0, tosearch.length) ) {
rows.push(i);
}
}
}
setTimeout( function(){
rows.length > 0 ? objAC.setRowCount( rows.length ) : objAC.setRowCount(0 ) ;
if(rows.length == 0){
objtextarea.setStyle("height", "29");
objAC.setHeaderText('No Matches',0);
}
else{
objtextarea.setStyle("height", "180");
objAC.setHeaderText('Found::'+rows.length ,0);
}
objAC.setRowIndices(rows);
objAC.setScrollTop(0);
},100);
}
}
document.write(obj);
</script>