Mike Waller
asked on
flex datagrid and combobox
I have a flex datagrid and some form fields including 2 combo boxes. Both combo boxes pull in data from my db table. both are bindable to the datagrid so that when you click on the record in the grid, the item in the combo box is highlighted. That works great. However, inside the datagrid, what is being passed back to the grid is the pk id. It needs to be the other field in the db table. What would I need to change?
flex app:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" xmlns:ns1="*" viewSourceURL="srcview/index.html" height="100%" borderStyle="none" width="100%">
<mx:RemoteObject id="ro" destination="ColdFusion" showBusyCursor="true" source="Media.components.Crud">
<mx:method name="getData" result="getDataResult(event)" />
<mx:method name="getcbData" result="getCBData(event)" />
<mx:method name="saveNewData" result="getDataResult(event)" />
<mx:method name="saveOldData" result="getDataResult(event)" />
<mx:method name="deleteData" result="getDataResult(event)" />
</mx:RemoteObject>
<mx:RemoteObject id="agency" destination="ColdFusion" showBusyCursor="true" source="Media.components.VideoProfessor.Agency2">
<mx:method name="getagencyData" result="getagencyData(event)" />
</mx:RemoteObject>
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
[Bindable] private var gridData:ArrayCollection;
[Bindable] private var cbData:Array;
[Bindable] private var agencyData:Array;
//on initialize, populate grid and combo boxes!
private function init():void{
ro.getData();
ro.getcbData();
agency.getagencyData();
}
private var isNew:Boolean = true;
public function getDataResult(e:ResultEvent):void{
dg.dataProvider = e.result as ArrayCollection;
makeNew();
}
private function getCBData(e:ResultEvent):void{
cbData = e.result as Array;
}
private function getagencyData(e:ResultEvent):void{
agencyData = e.result as Array;
}
private function makeNew():void{
firstNameFld.text = "";
lastNameFld.text = "";
officePhoneFld.text = "";
agencyId.text = "";
isNew = true;
}
private function save():void{
if(isNew){
ro.saveNewData(firstNameFld.text,lastNameFld.text,officePhoneFld.text,agencyId.text);
}else{
ro.saveOldData(firstNameFld.text,lastNameFld.text,officePhoneFld.text,agencyId.text,dg.selectedItem.id);
}
}
private function deleteData():void{
if(dg.selectedIndex > -1 )ro.deleteData(dg.selectedItem.id);
}
]]>
</mx:Script>
<mx:Label text="View your data below." width="1148" height="25" color="#FFFFFF" fontSize="12" fontFamily="Verdana" fontWeight="bold" id="toptext"/>
<mx:Panel width="1148" height="784" layout="absolute">
<mx:DataGrid dataProvider="{gridData}" x="10" y="10" width="1108" height="316" id="dg" change="isNew = false">
</mx:DataGrid>
<mx:Panel x="10" y="409" width="1108" height="286" layout="absolute">
<!-- fill with first names -->
<mx:FormItem label="First Name" id="firstnameLbl" x="10" y="70" width="266">
<ns1:comboBox id="firstNameFld" x="106" y="126" dataProvider="{cbData}" selectedValue="{dg.selectedItem.firstNameFld}"/>
</mx:FormItem>
<!-- fill with agency names -->
<mx:FormItem label="agency" id="agencyLbl" x="305" y="70" width="266">
<ns1:comboBox id="agencyId" x="106" y="126" dataProvider="{agencyData}" selectedValue="{dg.selectedItem.agencyId}"/>
</mx:FormItem>
<mx:FormItem label="Last Name" id="lastnameLbl" x="11" y="40">
<mx:TextInput id="lastNameFld" text="{dg.selectedItem.lastNameFld}"/>
</mx:FormItem>
<mx:FormItem label="Office Phone" id="officephoneLbl" x="305" y="40" width="266">
<mx:TextInput id="officePhoneFld" text="{dg.selectedItem.officePhoneFld}" width="176"/>
</mx:FormItem>
</mx:Panel>
<mx:Button x="10" y="712" label="Save Record" click="save()"/>
<mx:Button x="1011" y="712" label="Delete Record" click="deleteData()"/>
<mx:Button x="115" y="712" label="Add New Record" click="makeNew()"/>
<mx:Label x="105" y="334" text="Click on the record which will populate the fields below. After making your changes, click Save Record." width="1013" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="normal" id="midtext"/>
<mx:Label x="10" y="334" text="Edit A Record:" width="97" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="bold" id="midtext0"/>
<mx:Label x="130" y="355" text="Click Add New Record to clear all fields. Enter new data, then click Save Record." width="988" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="normal" id="midtext1"/>
<mx:Label x="10" y="355" text="Add New Record:" width="123" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="bold" id="midtext2"/>
<mx:Label x="115" y="376" text="Click on the record above. Then click Delete Record." width="1003" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="normal" id="midtext3"/>
<mx:Label x="10" y="376" text="Delete Record:" width="112" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="bold" id="midtext4"/>
</mx:Panel>
</mx:Application>
Crud.cfc:
<cfcomponent output="false">
<!--- get all data; populate in grid --->
<cffunction name="getData" access="remote" returntype="Query">
<cfset var local = {} />
<cfquery name="local.q" datasource="media">
select id, firstNameFld, lastNameFld, officePhoneFld, agencyId
from employees
</cfquery>
<cfreturn local.q/>
</cffunction>
<!--- get agencies; populate combo box --->
<cffunction name="getagencyData" access="remote" returntype="array">
<cfset local = {} />
<cfquery datasource="media" name="local.q">
select *
from agency
</cfquery>
<cfset local.result = arrayNew(1) />
<cfloop query="local.q">
<cfset local.temp = {} />
<cfset local.temp['data'] = local.q.agencyId />
<cfset local.temp['label'] = local.q.agency />
<cfset arrayAppend(local.result,local.temp) />
</cfloop>
<cfreturn local.result />
</cffunction>
<!--- get First Name; populate combo box --->
<cffunction name="getcbData" access="remote" returntype="array">
<cfset local = {} />
<cfquery datasource="media" name="local.q">
select firstNameFld
from employeesNames
</cfquery>
<cfset local.result = arrayNew(1) />
<cfloop query="local.q">
<cfset local.temp = {} />
<cfset local.temp['data'] = local.q.firstNameFld />
<cfset local.temp['label'] = local.q.firstNameFld />
<cfset arrayAppend(local.result,local.temp) />
</cfloop>
<cfreturn local.result />
</cffunction>
<!--- save new record --->
<cffunction name="saveNewData" access="remote" returntype="Query">
<cfargument name="firstNameFld" type="string" required="true"/>
<cfargument name="lastNameFld" type="string" required="true"/>
<cfargument name="officePhoneFld" type="string" required="true"/>
<cfargument name="agencyId" type="string" required="true"/>
<cfquery datasource="media">
insert
into employees
( firstNameFld, lastNameFld, officePhoneFld, agencyId)
values ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.firstNameFld#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.lastNameFld#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.officePhoneFld#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.agencyId#"/> )
</cfquery>
<cfreturn getData() />
</cffunction>
<!--- save existing record --->
<cffunction name="saveOldData" access="remote" returntype="Query">
<cfargument name="firstNameFld" type="string" required="true"/>
<cfargument name="lastNameFld" type="string" required="true"/>
<cfargument name="officePhoneFld" type="string" required="true"/>
<cfargument name="agencyId" type="string" required="true"/>
<cfargument name="id" type="Numeric" required="true" />
<cfquery datasource="media">
update employees
set firstNameFld = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.firstNameFld#" />,
lastNameFld = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.lastNameFld#" />,
officePhoneFld = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.officePhoneFld#" />,
agencyId = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.agencyId#" />
where id = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.id#" />
</cfquery>
<cfreturn getData() />
</cffunction>
<!--- delete record --->
<cffunction name="deleteData" access="remote" returntype="Query">
<cfargument name="id" type="string" required="true">
<cfquery datasource="media">
delete
from employees
where id = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.id#" />
</cfquery>
<cfreturn getData() />
</cffunction>
</cfcomponent>
Agency2.cfc:
<cfcomponent output="false">
<!--- get agencies; populate combo box --->
<cffunction name="getAgencyData" access="remote" returntype="array">
<cfset local = {} />
<cfquery datasource="media" name="local.q">
select *
from agency
</cfquery>
<cfset local.result = arrayNew(1) />
<cfloop query="local.q">
<cfset local.temp = {} />
<cfset local.temp['data'] = local.q.agencyId />
<cfset local.temp['label'] = local.q.agencyId />
<cfset arrayAppend(local.result,local.temp) />
</cfloop>
<cfreturn local.result />
</cffunction>
</cfcomponent>
ASKER
In my db table (called agency), I have 2 columns (agencyId, agency). My combo box in my flex app show the agencyId, not agency. Can you please explain what I should change in my flex code or cfcs to make it so that the combo box show the correct column. Also, the column in the datagrid is also displaying agencyId when it should be pulling in agency data from my db table.
>> Also, the column in the datagrid is also displaying agencyId when it should be pulling in agency data from my db table.
When I read the lines 12 & 13 of your code and I read the lines 250 & 251 I see why.
Change line 251 being
<cfset local.temp['label'] = local.q.agencyId />
into
<cfset local.temp['label'] = local.q.agency />
When I read the lines 12 & 13 of your code and I read the lines 250 & 251 I see why.
Change line 251 being
<cfset local.temp['label'] = local.q.agencyId />
into
<cfset local.temp['label'] = local.q.agency />
Mistake: changing that line 251 as I mentioned is to resolve the combo box problem.
Still thinking about the datagrid problem...
Still thinking about the datagrid problem...
Concerning the datagrid:
In lines 117/118 I see that your query agencyId, not agency
117 select id, firstNameFld, lastNameFld, officePhoneFld, agencyId
118 from employees
In lines 117/118 I see that your query agencyId, not agency
117 select id, firstNameFld, lastNameFld, officePhoneFld, agencyId
118 from employees
ASKER
Ok, I fixed all that but now when I click on the record in the datagrid, the item doesn't get selected in the drop down. In the drop down, I can select another item and click Save Record which works so that good. Plus I can see the agencies in the drop down and in the datagrid. Just that last part and we should on our way.
ASKER
Also, on the Save button, the agencyId is not being saved to the table, but the agency. It's needs to the agencyId (datatype int in the table).
ASKER
ok, forget that problem with the drop down item not being highlighted. It was because the record is insrting a string.
ASKER
The last problem I see is my last point and that is its insrting agency (string) into the table but it needs to insrt the agencyId.
>> It's needs to the agencyId (datatype int in the table).
Then why does line 180 reads:
<cfargument name="agencyId" type="string" required="true"/>
?
Then why does line 180 reads:
<cfargument name="agencyId" type="string" required="true"/>
?
ASKER
yea, that true that needs changed. however, it's still not passing a numeric value into the table.
ASKER
Ok, I changed that string to numeric in the crud.cfc:
<cfcomponent output="false">
<!--- get all data; populate in grid --->
<cffunction name="getData" access="remote" returntype="Query">
<cfset var local = {} />
<cfquery name="local.q" datasource="media">
select ME.*, A.*
from employees ME, agency A
where ME.agencyId = A.agencyId
</cfquery>
<cfreturn local.q/>
</cffunction>
<!--- get First Name; populate combo box --->
<cffunction name="getcbData" access="remote" returntype="array">
<cfset local = {} />
<cfquery datasource="media" name="local.q">
select firstNameFld
from employeesNames
</cfquery>
<cfset local.result = arrayNew(1) />
<cfloop query="local.q">
<cfset local.temp = {} />
<cfset local.temp['data'] = local.q.firstNameFld />
<cfset local.temp['label'] = local.q.firstNameFld />
<cfset arrayAppend(local.result,local.temp) />
</cfloop>
<cfreturn local.result />
</cffunction>
<!--- save new record --->
<cffunction name="saveNewData" access="remote" returntype="Query">
<cfargument name="firstNameFld" type="string" required="true"/>
<cfargument name="lastNameFld" type="string" required="true"/>
<cfargument name="officePhoneFld" type="string" required="true"/>
<cfargument name="agencyId" type="numeric" required="true"/>
<cfquery datasource="media">
insert
into employees
( firstNameFld, lastNameFld, officePhoneFld, agencyId)
values ( <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.firstNameFld#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.lastNameFld#"/>,
<cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.officePhoneFld#"/>,
<cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.agencyId#"/> )
</cfquery>
<cfreturn getData() />
</cffunction>
<!--- save existing record --->
<cffunction name="saveOldData" access="remote" returntype="Query">
<cfargument name="firstNameFld" type="string" required="true"/>
<cfargument name="lastNameFld" type="string" required="true"/>
<cfargument name="officePhoneFld" type="string" required="true"/>
<cfargument name="agencyId" type="numeric" required="true"/>
<cfargument name="id" type="Numeric" required="true" />
<cfquery datasource="media">
update employees
set firstNameFld = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.firstNameFld#" />,
lastNameFld = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.lastNameFld#" />,
officePhoneFld = <cfqueryparam cfsqltype="cf_sql_varchar" value="#arguments.officePhoneFld#" />,
agencyId = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.agencyId#" />
where id = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.id#" />
</cfquery>
<cfreturn getData() />
</cffunction>
<!--- delete record --->
<cffunction name="deleteData" access="remote" returntype="Query">
<cfargument name="id" type="string" required="true">
<cfquery datasource="media">
delete
from employees
where id = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.id#" />
</cfquery>
<cfreturn getData() />
</cffunction>
</cfcomponent>
ASKER
So I guess what I need to figure out is how can I display (label) the agency in the drop down but insert the agencyId (data)?
OK. And does that help?
>> So I guess what I need to figure out is how can I display (label) the agency in the drop down but insert the agencyId (data)?
You need to fill up your combo with agencyid's and use a labelfunction that "translate's" the agencyId into the agency
You need to fill up your combo with agencyid's and use a labelfunction that "translate's" the agencyId into the agency
ASKER
can't get it work. It throws an error.
>> It throws an error.
Mmmm, that's not very informative... ;o)
Complete error message? At what line?
Mmmm, that's not very informative... ;o)
Complete error message? At what line?
ASKER
Sorry, this is the error I get when the page loads is:
Error #1081: Property @agencyId not found on Object and there is no default value
Error #1081: Property @agencyId not found on Object and there is no default value
flex app:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init()" xmlns:ns1="*" viewSourceURL="srcview/index.html" height="100%" borderStyle="none" width="100%">
<!-- Crud.cfc -->
<mx:RemoteObject id="ro" destination="ColdFusion" showBusyCursor="true" source="Media.components.Crud">
<mx:method name="getData" result="getDataResult(event)" />
<mx:method name="getcbData" result="getCBData(event)" />
<mx:method name="saveNewData" result="getDataResult(event)" />
<mx:method name="saveOldData" result="getDataResult(event)" />
<mx:method name="deleteData" result="getDataResult(event)" />
</mx:RemoteObject>
<!-- Agency2.cfc -->
<mx:RemoteObject id="agency" destination="ColdFusion" showBusyCursor="true" source="Media.components.Agency2">
<mx:method name="getagencyData" result="getagencyData(event)" />
</mx:RemoteObject>
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
import mx.utils.StringUtil;
[Bindable] private var gridData:ArrayCollection;
[Bindable] private var cbData:Array;
[Bindable] private var agencyData:Array;
private function agencyId_labelFunc(item:Object):String {
return StringUtil.substitute("{0} ({1})", item.@agencyId, item.@agency);
}
//on init, populate grid and combo boxes!
private function init():void{
ro.getData();
ro.getcbData();
agency.getagencyData();
}
private var isNew:Boolean = true;
public function getDataResult(e:ResultEvent):void{
dg.dataProvider = e.result as ArrayCollection;
makeNew();
}
private function getCBData(e:ResultEvent):void{
cbData = e.result as Array;
}
private function getagencyData(e:ResultEvent):void{
agencyData = e.result as Array;
}
private function makeNew():void{
firstNameFld.text = "";
lastNameFld.text = "";
officePhoneFld.text = "";
agencyId.text = "";
isNew = true;
}
private function save():void{
if(isNew){
ro.saveNewData(firstNameFld.text,lastNameFld.text,officePhoneFld.text,agencyId.text);
}else{
ro.saveOldData(firstNameFld.text,lastNameFld.text,officePhoneFld.text,agencyId.text,dg.selectedItem.id);
}
}
private function deleteData():void{
if(dg.selectedIndex > -1 )ro.deleteData(dg.selectedItem.id);
}
]]>
</mx:Script>
<mx:Label text="View your data below." width="1148" height="25" color="#FFFFFF" fontSize="12" fontFamily="Verdana" fontWeight="bold" id="toptext"/>
<mx:Panel width="1148" height="784" layout="absolute">
<mx:DataGrid dataProvider="{gridData}" x="10" y="10" width="1108" height="316" id="dg" change="isNew = false">
</mx:DataGrid>
<mx:Panel x="10" y="409" width="1108" height="286" layout="absolute">
<!-- fill with first names -->
<mx:FormItem label="First Name" id="firstnameLbl" x="10" y="70" width="266">
<ns1:comboBox id="firstNameFld" x="106" y="126" dataProvider="{cbData}" selectedValue="{dg.selectedItem.firstNameFld}"/>
</mx:FormItem>
<!-- fill with agency names -->
<mx:FormItem label="agency" id="agencyLbl" x="305" y="70" width="266">
<ns1:comboBox id="agencyId" x="106" y="126" dataProvider="{agencyData}" labelFunction="agencyId_labelFunc" selectedValue="{dg.selectedItem.agencyId}"/>
</mx:FormItem>
<mx:FormItem label="Last Name" id="lastnameLbl" x="11" y="40">
<mx:TextInput id="lastNameFld" text="{dg.selectedItem.lastNameFld}"/>
</mx:FormItem>
<mx:FormItem label="Office Phone" id="officephoneLbl" x="305" y="40" width="266">
<mx:TextInput id="officePhoneFld" text="{dg.selectedItem.officePhoneFld}" width="176"/>
</mx:FormItem>
</mx:Panel>
<mx:Button x="10" y="712" label="Save Record" click="save()"/>
<mx:Button x="1011" y="712" label="Delete Record" click="deleteData()"/>
<mx:Button x="115" y="712" label="Add New Record" click="makeNew()"/>
<mx:Label x="105" y="334" text="Click on the record which will populate the fields below. After making your changes, click Save Record." width="1013" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="normal" id="midtext"/>
<mx:Label x="10" y="334" text="Edit A Record:" width="97" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="bold" id="midtext0"/>
<mx:Label x="130" y="355" text="Click Add New Record to clear all fields. Enter new data, then click Save Record." width="988" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="normal" id="midtext1"/>
<mx:Label x="10" y="355" text="Add New Record:" width="123" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="bold" id="midtext2"/>
<mx:Label x="115" y="376" text="Click on the record above. Then click Delete Record." width="1003" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="normal" id="midtext3"/>
<mx:Label x="10" y="376" text="Delete Record:" width="112" height="25" color="#990000" fontSize="11" fontFamily="Verdana" fontWeight="bold" id="midtext4"/>
</mx:Panel>
</mx:Application>
>> private function agencyId_labelFunc(item:Ob ject):Stri ng {
>> return StringUtil.substitute("{0} ({1})", item.@agencyId, item.@agency);
>> }
Well, it's not that easy.
To make the above work, your combo box has to contain objects that has both the "agencyId" and "agency" properties.
Which apparently isn't the case currently. (it just contains String's)
Hence the error.
What I suggested was, that your combo should contain agencyId's (again) - because needed for the update.
Then if you have a dictionary/map to translate an id to the agency name you could use that in your label function. (input:agency id - output:agency name)
>> return StringUtil.substitute("{0}
>> }
Well, it's not that easy.
To make the above work, your combo box has to contain objects that has both the "agencyId" and "agency" properties.
Which apparently isn't the case currently. (it just contains String's)
Hence the error.
What I suggested was, that your combo should contain agencyId's (again) - because needed for the update.
Then if you have a dictionary/map to translate an id to the agency name you could use that in your label function. (input:agency id - output:agency name)
ASKER
Ok, that makes sense. So how would I bring both values into the combo box using the following?
<cfcomponent output="false">
<!--- get agencies; populate combo box --->
<cffunction name="getAgencyData" access="remote" returntype="array">
<cfset local = {} />
<cfquery datasource="media" name="local.q">
select *
from agency
</cfquery>
<cfset local.result = arrayNew(1) />
<cfloop query="local.q">
<cfset local.temp = {} />
<cfset local.temp['data'] = local.q.agencyId />
<cfset local.temp['label'] = local.q.agency />
<cfset arrayAppend(local.result,local.temp) />
</cfloop>
<cfreturn local.result />
</cffunction>
</cfcomponent>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Going off line now. See you...
ASKER
Ok, the top didn't work, got an error:
Error #1081: Property @data not found on Object and there is no default value
i tried the bottom and it loaded fine but the combo box now has [object] [object] in it
Error #1081: Property @data not found on Object and there is no default value
i tried the bottom and it loaded fine but the combo box now has [object] [object] in it
So, one combo box item now displays as
[object] [object]
?
One toString() call resulting in [object][object].
That would mean that the item coming in (in agencyId_labelFunc) is an array (of 2 objects in this case)
In that case, try applying this agencyId_labelFunc function
private function agencyId_labelFunc(item:Ob ject):Stri ng {
var classInfo:XML = describeType(item);
return classInfo.@name.toString() ;
}
and let me know what you see in your combo box for each element. (I expect you see something that contains "Array")
If that is the case change the method like this:
private function agencyId_labelFunc(item:Ob ject):Stri ng {
var classInfo:XML = describeType(Array(item)[0 ]);
return classInfo.@name.toString() ;
}
and again let me know what you see in your combo box for each element.
[object] [object]
?
One toString() call resulting in [object][object].
That would mean that the item coming in (in agencyId_labelFunc) is an array (of 2 objects in this case)
In that case, try applying this agencyId_labelFunc function
private function agencyId_labelFunc(item:Ob
var classInfo:XML = describeType(item);
return classInfo.@name.toString()
}
and let me know what you see in your combo box for each element. (I expect you see something that contains "Array")
If that is the case change the method like this:
private function agencyId_labelFunc(item:Ob
var classInfo:XML = describeType(Array(item)[0
return classInfo.@name.toString()
}
and again let me know what you see in your combo box for each element.
ASKER
ok, I'll check it out.
ASKER
Thx!
thanx 4 axxepting
ASKER
sorry it took so long. I'll manage those better in the future.
All right :)
>> It needs to be the other field in the db table. What would I need to change?
I don't understand what you're trying to say.
Could you please explain it in other words?