Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 22nd, 2004, 12:31 PM
Registered User
 
Join Date: Mar 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Stupid(?) newbie question :o)

Hi there,

I'm just starting to work with C# and the ADO.NET.

As a test project i've choosen a simple Customer-Management Application.

So here's my problem:

In my main form I have a DataGrid that should display all my Customers. I've used a DataSet with NO Database Connection, just codes it manually and using XML-Files for storing data.

I have a MainMenu and there I select "Add new Customer", wich opens a form to enter the Data and saves it in a DataSet (and in an XML-File).

How do I update the DataGrid in the Main Window, when a Customers has been enterd in my "frmAddCustomer" form?

I now create the Dataset for storing the Customer-Data in the btnSave_Click Method. Do I have to use the DataSet from the MainWindow...and if so HOW? :o)

Please help a newbie. :o)

Thanks in advance!

Kind regards,
Iceman
 
Old March 22nd, 2004, 03:53 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I use the ItemCommand event, for when the e.CommandName.ToLower() parameter equals "update" (when update button is clicked), you can do an update statement that way. For insertion, there isn't any default way of doing this. I found a way on Microsoft's web site (titled A truly Excel-like grid control, but don't have the link) that allowed you to do insertions in the grid.





Similar Threads
Thread Thread Starter Forum Replies Last Post
stupid question... seymour_glass C# 3 May 2nd, 2007 06:40 AM
Probably stupid question skiloff BOOK: ASP.NET Website Programming Problem-Design-Solution 0 July 6th, 2005 02:44 PM
stupid question Warbird General .NET 6 December 7th, 2004 09:33 AM
A really stupid question Phaedrus VB.NET 2002/2003 Basics 3 October 29th, 2003 02:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.