3.2.0

input in header - refresh

i have a "search" input box in my header im trying to implement since ctrl-f doesnt work with unrendered data. it finds the row correctly and highlights it, just like I want. However right after it does everything it refreshes the grid and i lose everything it just found. It only happens when i press enter after typing in the input. is there a way to override this?

find = new AW.UI.Input;
    table.setHeaderTemplate(find, 0,1);
    find.onControlValidating = function(){
        if (window.event.type == 'keydown') 
        { 
        var re = new RegExp(">"+find.getControlText()+"</a>");
            for(c=0; c < myCells.length; c++){
                if(table.getCellData(0,c).match(re)){
                    table.setSelectedRows([c]);
                    table.setCurrentRow([c]);
                }
            } 
        }
    };
Ryan Garabedian
September 26,
for future referance here is my solution, basically it caught the enter key and did nothing with it

find.setEvent("onkeypress", function(e) {
    var keyCode = e.keyCode?e.keyCode : e.which;

    if( keyCode == 13 )
    {
    e.returnValue = false;
    }
    });
Ryan Garabedian
October 3,

This topic is archived.

See also:


Back to support forum