473,388 Members | 1,234 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,388 software developers and data experts.

GridView, XML, and .NET 2005 Application

Hello, I'm in the processing of learning .NET 2005 and an trying to rewrite
a simple command line application that I wrote a couple years ago. I have
the following requirements:

1) Read an XML file that I create with a list of .EXE and .DLL files.

2) Scan a directory based on the path stored within the XML file and extract
the production version information

3) Add the Path, Filename and version information to a GridView control.
Now I have item #3 working today which displays output to screen using
console.write.

Question 1:

How can I add headers to a datagrid and update with my own information based
on me scanning a directory?

Question 2:

My application today reads the file path information, etc., from SQL Server
and then scans the directory for the version information. I would like to
instead use an XML file to contain this information instead of SQL Server.
This way I can use ClickOnce easily deploy my application without having a
SQL Server requirement. Most of my updates will be done to the XML file
only, so I would simply like to republish my ClickOnce to have user
redownload new XML file.

What is the best way for me to create an XML file of my data that can be
maintained? I have columsn such as:

1) Filename

2) Path of file

3) Description

4) Shortname of file

Each row within the XML will be unique. I need a way that I can easily
update/create this file. I currently have about 200 rows in SQL that I need
to get into my XML file. I really do not want to retype all the
information, but I can if I have to.

Any help or direction with this would be appreciated.

Nov 30 '05 #1
3 1291
You can save a DataSet as XML.

And something else you might want to think about. If the data displayed is
static, not requiring any user interaction, you might want to think about
optimizing your app by using an XSL transform to create the data in HTML in
the page, rather than a DataGrid. You can create an XSL style sheet, and use
an Xml WebControl to display it in any format you choose (as HTML).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition

"dm1608" <dm****@spam.net> wrote in message
news:u3**************@tk2msftngp13.phx.gbl...
Hello, I'm in the processing of learning .NET 2005 and an trying to
rewrite a simple command line application that I wrote a couple years ago.
I have the following requirements:

1) Read an XML file that I create with a list of .EXE and .DLL files.

2) Scan a directory based on the path stored within the XML file and
extract the production version information

3) Add the Path, Filename and version information to a GridView control.
Now I have item #3 working today which displays output to screen using
console.write.

Question 1:

How can I add headers to a datagrid and update with my own information
based on me scanning a directory?

Question 2:

My application today reads the file path information, etc., from SQL
Server and then scans the directory for the version information. I would
like to instead use an XML file to contain this information instead of SQL
Server. This way I can use ClickOnce easily deploy my application without
having a SQL Server requirement. Most of my updates will be done to the
XML file only, so I would simply like to republish my ClickOnce to have
user redownload new XML file.

What is the best way for me to create an XML file of my data that can be
maintained? I have columsn such as:

1) Filename

2) Path of file

3) Description

4) Shortname of file

Each row within the XML will be unique. I need a way that I can easily
update/create this file. I currently have about 200 rows in SQL that I
need to get into my XML file. I really do not want to retype all the
information, but I can if I have to.

Any help or direction with this would be appreciated.


Nov 30 '05 #2
Thanks for the reply, Keven.

I'm trying to do away with using SQL Server. If I use the SaveToXML option
of ADO.NET, is the XML file the is created something that can easily be
maintained going forward? I guess I cannot control the output or format of
the XML file, so that is why I'm thinking it may not be what I want.

Opinions?

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
You can save a DataSet as XML.

And something else you might want to think about. If the data displayed is
static, not requiring any user interaction, you might want to think about
optimizing your app by using an XSL transform to create the data in HTML
in the page, rather than a DataGrid. You can create an XSL style sheet,
and use an Xml WebControl to display it in any format you choose (as
HTML).

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition

"dm1608" <dm****@spam.net> wrote in message
news:u3**************@tk2msftngp13.phx.gbl...
Hello, I'm in the processing of learning .NET 2005 and an trying to
rewrite a simple command line application that I wrote a couple years
ago. I have the following requirements:

1) Read an XML file that I create with a list of .EXE and .DLL files.

2) Scan a directory based on the path stored within the XML file and
extract the production version information

3) Add the Path, Filename and version information to a GridView control.
Now I have item #3 working today which displays output to screen using
console.write.

Question 1:

How can I add headers to a datagrid and update with my own information
based on me scanning a directory?

Question 2:

My application today reads the file path information, etc., from SQL
Server and then scans the directory for the version information. I would
like to instead use an XML file to contain this information instead of
SQL Server. This way I can use ClickOnce easily deploy my application
without having a SQL Server requirement. Most of my updates will be done
to the XML file only, so I would simply like to republish my ClickOnce to
have user redownload new XML file.

What is the best way for me to create an XML file of my data that can be
maintained? I have columsn such as:

1) Filename

2) Path of file

3) Description

4) Shortname of file

Each row within the XML will be unique. I need a way that I can easily
update/create this file. I currently have about 200 rows in SQL that I
need to get into my XML file. I really do not want to retype all the
information, but I can if I have to.

Any help or direction with this would be appreciated.



Nov 30 '05 #3
I don't think it s a good idea to replace the database with an XML file. You
will loose all the benefits of concurrency control, backup/restore,
maintenance etc that the database provides you with.

You can store your XML in the database though either shredded (if it is
relational in nature) or natively...

Best regards
Michael

"dm1608" <dm****@spam.net> wrote in message
news:es**************@TK2MSFTNGP11.phx.gbl...
Thanks for the reply, Keven.

I'm trying to do away with using SQL Server. If I use the SaveToXML
option of ADO.NET, is the XML file the is created something that can
easily be maintained going forward? I guess I cannot control the output
or format of the XML file, so that is why I'm thinking it may not be what
I want.

Opinions?

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
You can save a DataSet as XML.

And something else you might want to think about. If the data displayed
is static, not requiring any user interaction, you might want to think
about optimizing your app by using an XSL transform to create the data in
HTML in the page, rather than a DataGrid. You can create an XSL style
sheet, and use an Xml WebControl to display it in any format you choose
(as HTML).

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
If you push something hard enough,
it will fall over.
- Fudd's First Law of Opposition

"dm1608" <dm****@spam.net> wrote in message
news:u3**************@tk2msftngp13.phx.gbl...
Hello, I'm in the processing of learning .NET 2005 and an trying to
rewrite a simple command line application that I wrote a couple years
ago. I have the following requirements:

1) Read an XML file that I create with a list of .EXE and .DLL files.

2) Scan a directory based on the path stored within the XML file and
extract the production version information

3) Add the Path, Filename and version information to a GridView control.
Now I have item #3 working today which displays output to screen using
console.write.

Question 1:

How can I add headers to a datagrid and update with my own information
based on me scanning a directory?

Question 2:

My application today reads the file path information, etc., from SQL
Server and then scans the directory for the version information. I
would like to instead use an XML file to contain this information
instead of SQL Server. This way I can use ClickOnce easily deploy my
application without having a SQL Server requirement. Most of my updates
will be done to the XML file only, so I would simply like to republish
my ClickOnce to have user redownload new XML file.

What is the best way for me to create an XML file of my data that can be
maintained? I have columsn such as:

1) Filename

2) Path of file

3) Description

4) Shortname of file

Each row within the XML will be unique. I need a way that I can easily
update/create this file. I currently have about 200 rows in SQL that I
need to get into my XML file. I really do not want to retype all the
information, but I can if I have to.

Any help or direction with this would be appreciated.




Dec 15 '05 #4

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

Similar topics

3
by: | last post by:
Hello, I have created an ASP.NET 2.0 application that utilized a Gridview Control to display and update/delete data. The problem I am having is that the gridview control is displaying the data...
8
by: Mike Kelly | last post by:
I've chosen to implement the "optimistic concurrency" model in my application. To assist in that, I've added a ROWVERSION (TIMESTAMP) column to my main tables. I read the value of the column in my...
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. ...
5
by: Randy Smith | last post by:
Hi ALL, I wonder if anyone has been using n-tier to bind to a GridView control by using the ObjectDataSource. This is our first OOP web application, and we have no tables. Right now we are...
0
by: edurazee | last post by:
I am able to create BoundFields and Footer-rows dynamically like this in my GridView: protected void Page_Load(object sender, EventArgs e) { CreateGridView(); ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.