Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-08-03
3
Medium Priority
?
937 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

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

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

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…
Suggested Courses

618 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