473,500 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

REAL basic questions about grids

I am trying my first .NET project. I want to use a grid to display some
data. It is not bound to a data source.

I am having trouble with very simple actions.

1) Do I use a data grid, a list box, or what?
2) If I use a data grid, how do I set the numer of rows and columns and put
text into a cell?

Thanks,

Michael

Nov 20 '05 #1
4 1005
"Michael Hesse" <mh****@sbcglobal.net> schrieb
I am trying my first .NET project. I want to use a grid to display
some data. It is not bound to a data source.

I am having trouble with very simple actions.

1) Do I use a data grid, a list box, or what?
Depends on what you want to display and how it is to be displayed, whether
the user needs to change the data and so on. A listbox has no columns. A
listview can have columns and one column in a row can be edited. A Datagrid
is editable.
2) If I use a data grid, how do I set the numer of rows and columns
and put text into a cell?


You have to bind it to a data source.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
* "Michael Hesse" <mh****@sbcglobal.net> scripsit:
I am trying my first .NET project. I want to use a grid to display some
data. It is not bound to a data source.

I am having trouble with very simple actions.

1) Do I use a data grid, a list box, or what?
2) If I use a data grid, how do I set the numer of rows and columns and put
text into a cell?


I would use a listview control with its 'View' property set to
'Details'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bq*************@ID-208219.news.uni-berlin.de...
* "Michael Hesse" <mh****@sbcglobal.net> scripsit:
I am trying my first .NET project. I want to use a grid to display some
data. It is not bound to a data source.

I am having trouble with very simple actions.

1) Do I use a data grid, a list box, or what?
2) If I use a data grid, how do I set the numer of rows and columns and put text into a cell?


I would use a listview control with its 'View' property set to
'Details'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #4
Thanks for the reply. I'll try the listView for now and play around with
creating a data set and binding it later.

"Armin Zingler" <az*******@freenet.de> wrote in message
news:OK****************@TK2MSFTNGP11.phx.gbl...
"Michael Hesse" <mh****@sbcglobal.net> schrieb
I am trying my first .NET project. I want to use a grid to display
some data. It is not bound to a data source.

I am having trouble with very simple actions.

1) Do I use a data grid, a list box, or what?
Depends on what you want to display and how it is to be displayed, whether
the user needs to change the data and so on. A listbox has no columns. A
listview can have columns and one column in a row can be edited. A

Datagrid is editable.
2) If I use a data grid, how do I set the numer of rows and columns
and put text into a cell?


You have to bind it to a data source.
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5

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

Similar topics

2
3689
by: Alberto Santini | last post by:
I ported a Jos Stam's demo about Fluid mech to check the difference of speed between C implementation and Python. I think I achieved good results with Python and there is space to improve, without...
4
2214
by: Ramesh | last post by:
hi, Let me ask some basic questions. Can anybody explain me about the following questions: 1. When we have to create sn key? Whenever we compiled Component we have to create or it is a one time...
2
1493
by: orekinbck | last post by:
Hi There Using C# forms, I have a main screen that contains 2 data grids. * The data grids are connected to ArrayLists (each grid has its own ArrayList) * The data grids are intended for...
1
1528
by: James G. Beldock | last post by:
I must be missing something simple: I've got several grids on a single page. Those grids can have a variable numbers of lines. But if they expand or contract, I can't figure out how to move the...
0
1222
by: IGotYourDotNet | last post by:
I have a page and I need to put multiple grids on it, (10 to be exact). The issue i'm having is sometime some grids have 3 records and sometimes they can have 20 records and what happens is that the...
2
1839
by: Matthew Hood | last post by:
My company has expressed a desire to convert an existing MS Access application to a full VB.NET application. My experience is with VB6 so I want to ask a few questions and get some input on the...
1
1471
by: Ravi Singh | last post by:
hi I had also decided to follow the client sever development in real basic. Just what I want at this time is just some sample help project document that how to call webservcies in real basic. ...
0
1869
by: David Veeneman | last post by:
This post is for the Google crawler-- no response in required. Can a containment hierarchy made up of two collections derived from BindingList<T> be data-bound to master-detail dataGridView...
7
1192
by: CSharpguy | last post by:
I'm coding my first business web app in .NET 2.0 and its only a read only web app. I'm just pulling data from the database and allowing users to filter the data in the grids by using dropdowns....
2
1133
by: Hamayun Khan | last post by:
Hi I have Two Sql tables that hold jobs information. The field names are same but data types are different. I want to select to data from both tables using union into one query. but someone told...
0
7136
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
7018
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
7182
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
7232
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
7397
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5490
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,...
1
4923
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...
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.