?
Solved

How Do I connect Flash to a .net Webservice and show Results in a grid?

Posted on 2007-08-03
3
Medium Priority
?
935 Views
Last Modified: 2013-12-16
Hi there,

We are using Flash V8 Por and a .Net 2 webserice.

In our webservice theres a call that returns a string full of XML that describes a datatable... we have tested this and it all works fine.
we are using a webservice connector in flash and on the press of a button,  passing the results of the call into a textArea, which all works fine
We are having trouble displaying the returned XML in a datagrid though. I have maanged to get the datagrid to create the required numbe rof rows but it will not show any data.
Does anyone know where I can get an example of how to display this data in a grid using a webservice or does anyone know how do to it.
This is driving us crazy, we have been at it a week so far and still can;pt make any headway. we are c# developers by the way and not flash people, so easy steps please

BB
0
Comment
Question by:badbearontour
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
dfu23 earned 2000 total points
ID: 19628135
have you seen this article?
http://madowney.com/blog/2004/02/20/flash-web-services-and-net-datasets/

a key thing is that Flash needs an array of objects and not one of the .NET objects like a DataTable or a DataSet. from there you should be able to do whatever you need with the data ...
0
 
LVL 7

Author Comment

by:badbearontour
ID: 19636845
Hi

thanks for the lead,I'll give it a try today and get back to you

BB
0
 
LVL 7

Author Comment

by:badbearontour
ID: 19637169
Cool and the Gang....

That article pointed me in the right direction..

for the purposes of a complete Answer heres a brief overview of what the solutions was

Flash doesn't recognise .net datatables serialised into a xml, in either native or typed mode
So you have to create a custom object that matches all the columns you want from the table. then create an Array of these custom objects. You iterate through the datatable filling in the details of the new array of custom objects.
Below I have cutout my code, my custom object is the JobStatus Object that has 3 fields in it, description, status, statusdate



JobStatus[] myJobsArray = null;
DataTable myData = myDataCon.getJobs(p_ID);
if (myData.Rows.Count > 0)
{
  myJobsArray = new JobStatus[myData.Rows.Count];
  int i = 0;
  foreach (DataRow dr in myData.Rows)
  {
     myJobsArray[i] = new JobStatus();
     myJobsArray[i].description = dr[0].ToString();
     myJobsArray[i].status = dr[2].ToString();
     myJobsArray[i].statusDate = dr[1].ToString();
     i++;
   }
}

Hope this helps anyone coming after me, I spent a week trawling the web and got nowhere

BB
                                                
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question