473,405 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Export Gridview with SQL Datasource to XML

I've got a sales figure gridview with a SQLDataSource.

I need to pass the data to Flash World Map so the sales figures can be
overlaid on each country.

Flash reads XML files.

How can I easily save the GridView into XML format for Flash to read? Also,
rather than save it as a file, how would I use Response.OutputStream?

Sep 29 '08 #1
2 2871
I would think you wouldn't want to be exporting a GridView because that is
formatted XML. You should probably be formatting the data used to populate
the gridview into XML. If you're using Sql Server as your DB, it already
comes with features that let you create XML resultsets using the FOR XML
clause. Take a look at the FOR XML section of the SQL Server docs for more
information as it's tricky to explain. You'll need to match up the XML
format that you generate with what Flash expects. It's one thing to say
Flash reads XML, but you need to know exactly which nodes it expects so you
can format your sql query properly to get the right output.

Hope this helps,
Mark Fitzpatrick

"Mark B" <no*****@none.comwrote in message
news:uq*************@TK2MSFTNGP06.phx.gbl...
I've got a sales figure gridview with a SQLDataSource.

I need to pass the data to Flash World Map so the sales figures can be
overlaid on each country.

Flash reads XML files.

How can I easily save the GridView into XML format for Flash to read?
Also, rather than save it as a file, how would I use
Response.OutputStream?
Sep 29 '08 #2
Thanks. The trouble with going from SQL straight to XML for us is that we
have some complex VB.NET functions that we have created that we perform on
the grid-view's fields and output them as template fields in the same
Gridview. I was hoping not to have to try and translate these functions into
SQL at the source so as to save time.

"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:uY*************@TK2MSFTNGP03.phx.gbl...
>I would think you wouldn't want to be exporting a GridView because that is
formatted XML. You should probably be formatting the data used to populate
the gridview into XML. If you're using Sql Server as your DB, it already
comes with features that let you create XML resultsets using the FOR XML
clause. Take a look at the FOR XML section of the SQL Server docs for more
information as it's tricky to explain. You'll need to match up the XML
format that you generate with what Flash expects. It's one thing to say
Flash reads XML, but you need to know exactly which nodes it expects so you
can format your sql query properly to get the right output.

Hope this helps,
Mark Fitzpatrick

"Mark B" <no*****@none.comwrote in message
news:uq*************@TK2MSFTNGP06.phx.gbl...
>I've got a sales figure gridview with a SQLDataSource.

I need to pass the data to Flash World Map so the sales figures can be
overlaid on each country.

Flash reads XML files.

How can I easily save the GridView into XML format for Flash to read?
Also, rather than save it as a file, how would I use
Response.OutputStream?
Sep 29 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Nalaka | last post by:
Hi, I have a gridView (grid1), which as a templateColumn. In the template column, I have put in a gridView (grid2) and a ObjectDataSource (objectDataSource2). Question is... How to I pass the...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
4
by: Jim Katz | last post by:
I have an application that updates a strongly typed data set at run time. I'd like to dynamically create a table that connects to a run time data table. For displaying the data, this works well. ...
0
by: Peter | last post by:
I experienced a bug, "Control GridView1 of type GridView myst be placed inside a form tag with runat=server". But I did so. I do not why, please advise. my code as below. Thanks. Peter <%@...
3
by: =?Utf-8?B?bWFuaWthMDI=?= | last post by:
Hi, I have a GridView control in page called eventslisting which is inheriting from a MasterPage. The normal code to export to GridView does not work and gives me an error - "Control of type...
5
by: NKaufman | last post by:
<asp:GridView ID="Basic" runat="server" DataKeyNames="QuestionID,isHeading" AutoGenerateColumns="false" AllowPaging="true" PageSize="100"> <Columns> <asp:BoundField Visible="false"...
4
by: mohaaron | last post by:
This seems like it should be simple to do but for some reason I have been unable to make it work. I would like to databind a SqlDataSource to a GridView during the click event of a button. This...
7
by: =?Utf-8?B?U0FM?= | last post by:
I am trying to cast my Gridview in my Code behide as a Dataset so I can manipulate the data. Here is the code snippet: Dim FilteredDataSet As New System.Data.DataSet Dim gv As New GridView gv...
3
by: Peter | last post by:
I have a GridView which is populated by List<ofObjects> Does anyone have example of how to sort the columns of this GridView? I have found examples without DataSourceControl but these use...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.