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 / Flash Remoting / December 2003



Tip: Looking for answers? Try searching our database.

Please help binding DataTable to ComboBox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nsentra - 18 Dec 2003 18:05 GMT
It seems so simple, I've read help and followed samples, but no luck. I am using MM Flash 2004 MX and Flash Remoting MX. Here is my _Result function.

function GetDates_Result(result)
{
DataGlue.bindFormatStrings (Dates_cb,result,"#ZDate#","#ZDate#");
}
It seems like combobox does get populated (rows are added when you expand the box), but there are no values and nothing to select! Seems like something minor is missing, but I can't pinpoint.

Also is there a way to manually go thru result and populate combobox? How do I know result object properties and methods? Are they same as methods of the object passed back by function (in this case DataTable)?

It's just one column. I've used Network Debugger and I can see all the dates!

Result (object #2)
.....Performance (object #3)
..........length: (undefined)
..........mRecordsAvailable: 59
..........serverInfo: (undefined)
..........uniqueID: 59
..........items (object #4)
...............[0] (object #5)
....................ZDate: "09/24/2003"
....................__ID__: 0
...............[1] (object #6)
....................ZDate: "09/25/2003"
....................__ID__: 1
...............[10] (object #7)
....................ZDate: "10/09/2003"
....................__ID__: 10
Nsentra - 18 Dec 2003 19:34 GMT
ok small step forward... from examples on http://www.flash-remoting.com here is snippet
// For MX 2004, DataGlue does not work as of 11/08/2003
// Loop over results instead
(wtf!? not one mm doc or site mentions that, I'm just about to throw flash in dumpster bin )

function ComboBoxFill(cbName, rs){
 var idField = "";
 var descField = "";
 for(var i=0; i<rs.getLength(); i++) {
   descField = rs.getItemAt(i)[fields[1]];
   idField = rs.getItemAt(i)[fields[0]];
   cbName.addItem({label:descField,data:idField});
 }
}

but now I get combobox filled with undefined, but network debugger sees values just fine..
Nsentra - 18 Dec 2003 19:45 GMT
sweet mother of jesus.. it finally works.. 1% of total project completed
 
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.