Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / March 2005



Tip: Looking for answers? Try searching our database.

Sorting dataset to listbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jonnysoco - 24 Mar 2005 20:50 GMT
hello all,

I having trouble sorting through a dataset and populating the results into a
listbox. The code I have is listed below. If anyone can offer some assistance,
it would be greatly apprieciated.

function goSearch():Void {
    //goto first data set record
    _root.data_ds.first();
    while (_root.data_ds.hasNext()) {
        if (_root.data_ds.type == _root.lookType.text) {
            list.removeAll();
            trace(_root.data_ds.title);
            ////////////////////////////////////////////////
            //data_ds.dataProvider = result;
            _root.data_ds.title = pcArray;
            var pcArray = new Array();
            length = data_ds.length;
            for (i=0; i<length; i++) {
                pcArray.addItem({label:data_ds.title, data:{title:data_ds.title,
id:data_ds.id, photourl:data_ds.photourl, desc:data_ds.desc, pdf:data_ds.pdf}});
            }
            list.dataProvider = pcArray;
            ////////////////////////////////////////////////
        }
        _root.data_ds.next();
    }
}
searchBut.onRelease = function() {
    goSearch();
};
stop();
GeorgeWS - 25 Mar 2005 18:56 GMT
Why not sort it in the query?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.