3.0 beta 2

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
October 21,
Just found this "untested", but maybe relating useful post for you:
/datagrid.1079/get-xml-data-for-make.html
If anyone have a working function/sample, please post.
Thanks
Carlos
October 21,
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
October 21,
Cris,

I've made a filtering example

/datagrid.8149/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)
October 21,
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
December 1,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.