custom filter on column

I have a column of image inside tag.

For example:

<a onclick="doSomething(this); return false;" href="#"><img src="/images/greystar.png" title=""></a>

<a onclick="doSomething(this); return false;" href="#"><img src="/images/yellowstar.png" title=""></a>

On load, both yellowstar and greystar show. On click, it only shows rows having “yellowstar.png” in the img tag.

unfortunately you will have to create your own custom filter.
Or you may try to use some custom exCell type similar to the image checkbox “acheck”:
dhtmlx.com/docs/products/dht … extra.html

I have code that work for a column of checkbox

//checkbox in header that can filter one column
dhtmlXGridObject.prototype._in_header_filter_checkbox=function(t,i,c){
    t.innerHTML=c[0]+"<input style=type='checkbox' />"+c[1];
    var self=this;
    t.firstChild.onclick=function(e){
        self.filterBy(i,this.checked?1:0, true);
            (e||event).cancelBubble=true;
    }
}

but in this case, I need to access to href attribute and I dont know how (I tried this.href, but it return empty). How do I access to html element attribute in each cell ?

You may try to use the following code:

grid.cells(rowId,colInd).cell.firstChild.href

The below code works for me, even though i have no idea

dhtmlXGridObject.prototype._in_header_filter_save=function(t,i,c){
    t.innerHTML=c[0]+"<input type='checkbox' />"+c[1];
    var self=this;
    t.firstChild.onclick=function(e){
        if (this.checked) self.filterBy(i, "unsaveCandidate");
        else self.filterBy(i, "");
        (e||event).cancelBubble=true;
    }
}

I have another checkbox filter for normal checkboxes

//checkbox in header that can filter one column
dhtmlXGridObject.prototype._in_checkbox_filter_checkbox=function(t,i,c){
    t.innerHTML=c[0]+"<input type='checkbox' />"+c[1];
    var self=this;
    t.firstChild.onclick=function(e){
        self.filterBy(i,this.checked?1:0);
            (e||event).cancelBubble=true;
    }
}

problem I have is filter_save and filter_checkbox works exclusive. Either works, but not both. How to make both work ?