javascriptsearchfiltergrideditablegrid

EditableGrid - show search filter & pagination using javascript


I am using EditableGrid to create a grid dynamically using Javascript.

I am able to display the grid properly. But can anyone please tell me, how do i add the search filter(search box) & pagination?


Solution

  • This should do the trick:

    <input type="text" id="searchField" />
    
    var myGrid= new EditableGrid("myGrid", {
        // Whatever options you chose
    });
    
    var searchField = document.getElementById('searchField');
    searchField.addEventListener(
        'keyup',
        function (){
            myGrid.filter(searchField.value);
        }
    );