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

Datagrid help, please

I am working to converta Delphi application to a C# Winform application.

Coming from the Delphi world of
1. Drop a Dataset on the form
2. Drop a Datasource on the form
3. Drop a DBGrid on the form
4. Set DBGrid's Datasource property
5. Set Datasource's Dataset property
6. Set Dataset's properties
7. Set Dataset to Active
and you're done...

What steps are required to do accompish the same in a C# Winform App???

I am finding information like this very difficult to find.
Nov 16 '05 #1
1 1178
1) Drop a DataAdapter on the Form and configure it, it'll create a
connection for you if you don't have one
2) Create a DataSet and drop it on the form
3) Drop a grid on the form and specify it's datasource
4) on Form_Load, call dataAdapter.Fill(dataset)

There are many other ways, but assuming you only want to use the visual
tools, that should do it for you.

You'll need to call fill though when the form loads. You'll also need to
specify an event (or create a button for instance) to call
dataadapter.Update so you can send the data back. If you don't know the
connection string in advance (ie you deploy this app) you can set it in the
Dynamic settings and edit it in your config file.

There's a lot of nuance here, and unless this is just a test run, I'd take a
step back and famialiarize myself with ADO.NET and DataBinding before I did
much with it.

HTH,

Bill
"The Cleaning Wonder Boy" <mrclean@p&g.com> wrote in message
news:eq**************@TK2MSFTNGP12.phx.gbl...
I am working to converta Delphi application to a C# Winform application.

Coming from the Delphi world of
1. Drop a Dataset on the form
2. Drop a Datasource on the form
3. Drop a DBGrid on the form
4. Set DBGrid's Datasource property
5. Set Datasource's Dataset property
6. Set Dataset's properties
7. Set Dataset to Active
and you're done...

What steps are required to do accompish the same in a C# Winform App???

I am finding information like this very difficult to find.

Nov 16 '05 #2

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

Similar topics

5
by: Prateek | last post by:
Hi, How can I change the width of a column in datagrid control? TIA Prateek
2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
5
by: Kevin | last post by:
Hi Al I have two questions about a datagrid, I need to decide which way to go.... I have a datagrid that will show me all the entries in a table. When I click on any cell(actually I would...
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
1
by: Mike Speak | last post by:
On my page_load, I am populating a Datagrid through the normal manner (which works) before attempting to pick out the items in one column to use in another part of my page. This is all within...
4
by: steroche | last post by:
I would REALLY appreciate help please please please! Im sure it is probably blindingly obvious to most of you but I am totally in the dark here!I am lost - i thought i had finally figured out this...
7
by: Juan Romero | last post by:
Hey guys, please HELP I am going nuts with the datagrid control. I cannot get the damn control to refresh. I am using soap to get information from a web service. I have an XML writer output...
5
by: Jeff User | last post by:
Hello ..NET 1.1, VS 2003, C# & asp.net I have tried to follow msdn instructions and samples but I can not get an event to fire for this button on the datagrid. There has to be something obvious...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
10
by: amiga500 | last post by:
Hello, I have one basic simple question. When I have multiple records in the datagrid as follows: Code Product 1 Product 2 Product 3 11111 A B C...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.