Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
MaxCardoso #1
Re: Help loading .net webservice data into flex grid -surely this is simple???!!!
Hi,
Tanks for your answer, but im not seem the solution yet. I have dificult whith
XML structure.
My webservice return the XLM below. I need to populate the array with '"
MailingList" content .
After too many trys, now I using the code below , but have a error when get
length off array for use in loop FOR ( ... :
TypeError: Error #1009: Cannot access a property or method of a null object
reference.
Thanks
Max
[Bindable]
private var arrayDataCampanha:Array;
[Bindable]
private function result_WS_DT(event:ResultEvent):void
{
// Convert result to array
alldataSeting = event.result.Tables["Mailinglist"].Rows as Array;
// Check the array content
if (event.result.Tables["Mailinglist"].Rows != null)
{
// loop to populate Dataprovider
for (var i:Number = 0; i < alldataSeting.length; i++)
{
// Fill Dataprovider atributs
arrayDataCampanha[i] = {name: alldataSeting[i].noMailing,
value: alldataSeting[i].Discagem,
idseting:alldataSeting[i].IdMailing,prospects:alldataSeting[i].prospects };
}
}
.Net WebServer Result.
<?xml version="1.0" encoding="utf-8" ?>
- <DataTable xmlns="http://tempuri.org/">
- <xs:schema id="NewDataSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xs:element name="NewDataSet" msdata:IsDataSet="true"
msdata:MainDataTable="Mailinglist" msdata:UseCurrentLocale="true">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="Mailinglist">
- <xs:complexType>
- <xs:sequence>
<xs:element name="IdMailing" type="xs:string" minOccurs="0" />
<xs:element name="noMailing" type="xs:string" minOccurs="0" />
<xs:element name="prospects" type="xs:string" minOccurs="0" />
<xs:element name="Discagem" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
- <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
- <DocumentElement xmlns="">
- <Mailinglist diffgr:id="Mailinglist1" msdata:rowOrder="0">
<IdMailing>01</IdMailing>
<noMailing>02 Ativo LD</noMailing>
<prospects>1000</prospects>
<Discagem>500</Discagem>
</Mailinglist>
- <Mailinglist diffgr:id="Mailinglist2" msdata:rowOrder="1">
<IdMailing>02</IdMailing>
<noMailing>02 Ativo LD</noMailing>
<prospects>2000</prospects>
<Discagem>600</Discagem>
</Mailinglist>
</DocumentElement>
</diffgr:diffgram>
</DataTable>
MaxCardoso Guest
-
Flex 3 advanced data grid grouping, show info with tree
Hi, Sorry for strange title, some times hard to sum up in one sentence. I have a database with annotations (notes) on a proof. Each note as a... -
Flex 3 Charts Loading Localized XML Data
Hello community, I am loading an XML file to build a LineSeries in a LineChart. I am binding a field from the XML tree to the yField property of... -
problem in loading webservice data in datagrid
Hi all, i have some problem in my application.Anybody direct me?.When i tried to load my webservice data into datagrid control,it shows some error... -
Pass flex data grid to CFC
I am using Flex JSP to create a Data Grid on a page. I need to save the entire contents of this Data Grid, but I am having issues with calling CFC... -
Please help - Simple scenario of using ASP.Net Data Grid control
Hello All I have some SQLServer tables each of them holding an average of 200 to 300 records each. I would like to make them available to select...



Reply With Quote

