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

Displaying/Manipulating Simple 2-D Table

I am at my wits end trying to do a very simple task in VB .Net. I have
spent a number of hours trying to figure out how to use datasets, datatables
and the Datagrid control but I am lost in the mass of functionality and
details that these entail. My task is simple ... I simply want to display a
bunch of data (not from an SQL darabase) in tabular form ... I want to be
able to set the width of each column and the foreground/background colors of
individual cells. I also want to be able to know what cell (row number and
column number) the user has clicked. Now I used to use the old Flexgrid
control in VB6 ... it was GREAT .. simple, intuitive and uncomplicated.
Isn't there some way in VB .Net to do the same thing without getting all
tied up in knots with the blockbuster dataset/datatable/datagrid complex?

Thanks.

Nov 23 '05 #1
3 1135
Fripper,

If you only want to use it as a flexgrid, than create datatables.

I thought that I had showed you a link to our website, that is full of it.

However the most simple one drag a datagrid on a new form and type paste
this in the load event. I typed it here so watch typos

\\\
dim dt as new datatable()
dt.columns.add("name")
dt.columns.add("email")
dt.loaddatarow(new object() {"fripper", "yo***@indiana.edu"},true)
mydatagrid.datasource = dt
///

Try it and don't tell anymore than that it is more difficult than a
flexgrid.

In addition if you want to see more see our website it started ad a datagrid
website.

http://www.vb-tips.com/default.aspx

I hope this helps,

Cor
Nov 23 '05 #2
OK ... that's a start ... but I still cannot figure out how to do the
simplest things ... can I force the width of the "name" column to some
number of pixels? ... How do I set the background color of the item in the
second row and second column to, say, "light blue"? ... when a user clicks a
cell how do I know what row/column was clicked and how can I force the value
in that cell to be, say, 5? I cannot find an example anywhere that talks
about these simple manipulations.

Your web site is a great resource ... it's just that I don't see there
examples which apply to my situation.

Thanks for your patience.
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:OL**************@TK2MSFTNGP09.phx.gbl...
Fripper,

If you only want to use it as a flexgrid, than create datatables.

I thought that I had showed you a link to our website, that is full of it.

However the most simple one drag a datagrid on a new form and type paste
this in the load event. I typed it here so watch typos

\\\
dim dt as new datatable()
dt.columns.add("name")
dt.columns.add("email")
dt.loaddatarow(new object() {"fripper", "yo***@indiana.edu"},true)
mydatagrid.datasource = dt
///

Try it and don't tell anymore than that it is more difficult than a
flexgrid.

In addition if you want to see more see our website it started ad a
datagrid website.

http://www.vb-tips.com/default.aspx

I hope this helps,

Cor

Nov 23 '05 #3
Fripper,

We have tried to place the most often asked questions on our Website which
are a little bit to complex to tell in a message.

In those are mostly not the basic things which are direct in the information
on MSDN about a datagrid.

http://msdn.microsoft.com/library/de...classtopic.asp

However I advice you to start with the simple things, I assume that you did
the same with the flexgrid the first time.

I hope this helps,

Cor
Nov 23 '05 #4

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

Similar topics

2
by: Steven | last post by:
Hi there, I have a list of values that I am displaying in a table (Not using a loop) I want to be able to put a graphic next to the item with the hightest price. I have all of the prices in...
14
by: Akbar | last post by:
Hey there, Big-time curiosity issue here... Here's the test code (it's not that long)... it's to display a large number of image links with captions, ideally pulled in from an external file...
6
by: Matt K. | last post by:
Hi there, I have a form in an Access project that contains a subform which displays the results of a query of the style "select * from where = #a certain date#". In the main part of the form...
2
by: Susan Bricker | last post by:
Greetings! Still the same application (as previous posts). I worked on the app while at work (don't tell my boss ... cause this is just for fun and not work related) and the form was working,...
2
by: shahla.saeed | last post by:
wat i want is to insert the calculated values(simple addition or subtraction) in fields of my table by using expression builders in my forms..i have made that feild in the table but still it...
2
by: Ido Flatow | last post by:
Hi all, I've been exploring the way I can manipulate WSDL.exe using SchemaImporterExtension in order to create a proxy to my liking. My situation is as follows - I have a web site that has...
2
by: bimeldip | last post by:
hi, I would like to create a program that allows users to manipulate a table without going through phpAdmin. I want to create a html form that can describe the table in a html page and allow users...
10
by: gnewsgroup | last post by:
I've googled and tried various approaches, but could not resolve this problem. The article at MSDN: Displaying Images in a GridView Column only presents a simple case where all data (including the...
4
scubak1w1
by: scubak1w1 | last post by:
Hello, I have a series of database tables in PostgreSQL that I am getting data from and displaying in the web browser (via PHP, SQL, etc.) How about giving some details of what I am looking to...
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
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
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.