3.2.0

Bug in Filter Alex posted

Alex,

first of all, im working about 3 months now with activewidgets and the company where I work want to buy a licence as soon as my demo project is done, this is my first topic, since I found an answer for all my questions so far on the forum.

Ok
I am using Dynamic XML data , paging and the filter functions you posted some time ago
The problem is the filter only works once, the second time you use the filter it seems it gets its data from some kind of cache and sorting wont work anymore.

here is the code :

function filterGrid()
{
    var i, rows = []; 
    var max = obj.getRowProperty("count"); 
    var res = 0; 
    var toSearch = (document.forms['gridSearchForm'].keyword.value).toLowerCase(); 
    var str;
    alert(max);
    for (i=0; i<max; i++)
    { 
        str = obj.getDataProperty("text", i, 1);
        if(((str.toLowerCase()).indexOf(toSearch)) >= 0) 
          rows.push(i); 
    }
    obj.setProperty("column/texts", columns);
    obj.setProperty("row/pageSize", 1000);
    obj.setRowProperty("count", rows.length); 
    obj.setRowProperty("values", rows); 
    obj.setColumnProperty("texts", columns);
    obj.setSelectionMultiple(true); 
    document.getElementById('pageLabel').innerHTML = "";
    obj.refresh();
}


So this is what happens :
everything is working great, I do a search, results are good, but when I do a second search, the filter is not searching within the results, but searching somewhere in the cache instead, and sorting wont work anymore, before search sorting is working, having any solutions?
S.Salehi
December 1,
One more thing, when you press shift to select all the rows, it gets more rows than I select,

result of filter = 10 rows for example, I do a shift and select all the rows, and it returns like 30 rows :/
S.Salehi
December 1,

This topic is archived.

See also:


Back to support forum