Documentation

registerFilter

registers a filter element

void registerFilter(HTMLElement node,object config,object obj);

Parameters

nodeHTMLElementthe html node of the filter
configobjectthe hash of settings
objobjectthe controller object

See also

Example

grid.registerFilter(document.getElementById("myfilter"), 
        { columnId:"title" }, 
        {
            getValue:function(node){
                return node.value;
            },
            setValue:function(node, value){
                node.value = value;
            }
        }
);

Details

In the above mentioned sample:

  • the input with 'myfilter' ID becomes filter for a datatable column with 'title' ID;
  • the getValue method of the newly created filter gets the value from its HTML node and sets it as filtering parameter.
Back to top