:: Forum >>

Alex could you help

Hi,

I am able to successfully search a grid bound with XML data. Code is :

var colToBeSearched = document.getElementById('colSearchName').options[document.getElementById('colSearchName').selectedIndex].text;
var stringToFind = document.getElementById('txtAdvSearch').value;
var xmlDoc = table.getXML();
var nodes = xmlDoc.selectNodes("//doc/docs/" + colToBeSearched);

Once i get the records in the 'nodes', How do i make an xml doc and bind it again to the Grid.

I have been stuck up. If anyone knows an answer please assist

Regards,
CN
Friday, October 21, 2005
Just found this "untested", but maybe relating useful post for you:
http://activewidgets.com/javascript.forum.1079.0/get-xml-data-for-make.html
If anyone have a working function/sample, please post.
Thanks
Carlos
Friday, October 21, 2005
Hi Carlos,

Thanks for the example but that does not show how to make an XML doc out of the 'nodes' and then bind it to the grid again. If you could help me out with this specific task it would be great. I have gone through the whole forum but couldnt find anything useful.

Thanks.
CN
Friday, October 21, 2005
Cris,

I've made a filtering example

http://www.activewidgets.com/javascript.forum.8149.0/filtering-rows-example.html

but later realized that you are using v1.0

In 1.0 filter function should look like this:

function filter(){

    var i, rows = [], max = obj.getRowProperty("count");

    for (i=0; i<max; i++){
        if (obj.getDataProperty("value", i, 4) < 20000){
            rows.push(i);
        }
    }

    obj.setRowProperty("count", rows.length);
    obj.setRowProperty("values", rows);
    obj.refresh();
}



Please correct me if you are actually trying to do something else (I thought it is about filtering rows)
Alex (ActiveWidgets)
Friday, October 21, 2005
Alex the code is not working for me,
Actually it works almost

The first time the results are allright, the second time you filter the data it gives me different results, and sorting does not work anymore :/
S.Salehi
Thursday, December 1, 2005

This topic is archived.


Back to support forum

Forum search