Wrox Programmer Forums
|
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics 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 December 17th, 2003, 05:15 PM
Registered User
 
Join Date: Dec 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default What control should I use ?

Hi. This will be my very first VB program and will link to another software package that we are using (A CATI system). The company that puts the package out has written an OLE Reference set of functions to pass their data to a VB program.

What I need to be able to do is to display (read only) these variables (their contents) to the screen. They sent me a small VB macro for Excel which does exactly what I want; display the data in nice neat columns with headings at the top.

Which control should I use to do this? At first I thought a DataGrid, but that assumes that you have a database. An Array would work but how do you display the contents in columns? Or could I just use a TextBox? Can you get stuff in TextBoxes in columns? Help. Thank you.
 
Old December 17th, 2003, 06:16 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jlick
Default

I am new to VB.Net, but I have done lots of work with VB 6. I have found that most data grids do not require that you use a database. I also know that in VB.Net you can have the data grids bind to your objects. So you could either create an object structure for the data, and have the grid bind to it. Or you can probably populate the grid yourself. I am not sure if you can have a grid bind to an array.



John R Lick
[email protected]
 
Old December 17th, 2003, 07:05 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

A VB.net datagrid can be databound to any object/class that implements the IEnumerable interface. Array's do this. Basically said: If you can "For..Each..Next" thru it, you can data bind it.

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
The control that triggered the UpdatePanel control Kika ASP.NET 2.0 Professional 0 January 17th, 2008 01:13 PM
How to put a button control in a GridView control ryan.webb ASP.NET 2.0 Basics 2 December 28th, 2007 05:26 AM
Can't move focus to control <control scptech Access VBA 8 October 26th, 2007 12:16 PM
Help! Custom Server Control using User Control diehard ASP.NET 1.0 and 1.1 Professional 2 January 4th, 2006 12:33 PM
Help with control initialization in user control mike_remember ASP.NET 1.0 and 1.1 Professional 7 December 19th, 2005 11:08 AM





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