Re: How do I create a simple table? DataGrid seems very complicated

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Using a grid may very well be an excellent option, however if you have
several values that can be changed for each "channel"
perhaps a TreeView control might be a better option. You could then have
the treeview on the left side of the form and a data entry area on the right
side.
When the user changes the node within the tree the data entry side would
reflect the information for the currently selected channel.

Its difficult to provide "good" suggestions without knowing more about the
data your trying to work with. If you use a TreeView this is very similar
to the Windows Explorer feel.

Good luck,
Dan




<longbrmb@xxxxxxxxx> wrote in message
news:f949985c-9ace-4713-a132-defa66fa949c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 26, 10:07 pm, Jack Jackson <jjack...@xxxxxxxxxxxxxxxx> wrote:
For WinForms, DataGrid was replaced by DataGridView in VS 2005.

What objects you use depend on what you want to do.

A DataGridView displays data. Normally it is fed from a data source,
although it can be used unbound with no source.

If by "windows file manager" you mean Windows Explorer, then the
ListView control is similar to its display.

DataTable is used to hold rows of data in memory. It is normally
filled from a database or some other external repository such as an
XML file, although it too can be filled programatically.

I would suggest that you start by deciding where this configuration
information is to be stored, and then decide how to represent it in
memory for display.

On Tue, 26 Aug 2008 19:47:16 -0400, "eBob.com"

<faken...@xxxxxxxxxxxxxxxx> wrote:
I recently used a DataGrid control for the first time. For my simple app
(something like filemanager actuallly) I used an "unbound" DataGrid -
that
seemed more simple than a "bound" DataGrid for what I needed. The problem
is that because DataGrid is so damn flexible it takes a daunting amount
of
documentation.

I got almost 800 hits doing a Google search for

datagrid unbound vb.net example sample

Good Luck, Bob

<longb...@xxxxxxxxx> wrote in message
news:7ea20e26-5160-4b92-97ef-723c33586608@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm relatively new to Windows Forms, so I haven't figured out how to
do certain things yet. I come from the Java world with Swing and
SWT. I am trying to create a simple table that is used to configure
some hardware. At this point I just want to get something built read-
only. What I really want is something that looks like the standard
windows file manager in details mode.

From what I can tell, the DataGrid control is what I should be using,
is that right? I've looked at some tutorials and it looks incredibly
complicated. In SWT you had a Table, TableColumns, and TableItems and
you just built the table as you wanted. In .NET there are DataTables,
data binding, links to other tables and all kinds of stuff. Is there
not an interface to just deal with columns and cells? Also, every
screenshot I've seen looks like some ugly table from Windows 3.1, how
do I get something that looks like the tables used in the Windows file
manager?

Does anyone have any suggestions or do I just need to tough it out and
read through tutorials and documentation to figure out how these
DataGrids work?

You guys have given me a few places to look for more information,
thanks!

Yes, I do mean Windows Explorer. But perhaps a clearer explanation of
what I'm talking about is at http://www.eclipse.org/swt/widgets/. If
you scroll down and look at the screenshot for the Table class, that's
the look I'm going for.

As for how my data is being stored, right now I have a class that
handles interacting with this piece of hardware I'm using. The
hardware has multiple identical channels, each of which can be
configured individually. The class can already be used by itself, but
the user would need to write the code to set it up every time. Now
I'm trying to build a GUI class that operates on this hardware class
to allow the user to configure the device on the fly. I thought that
a table whose rows correspond to the channels in the device would be
an intuitive way to display the hardware configuration. The trick is
that I will need to have drop-down boxes as some of the parameters.
From what I've read so far, I will need to write a custom column style
to enable other controls in the DataGrid.

I'll look into the ListView class as well. Can it do multiple
columns?

Thanks again,
Matt


.



Relevant Pages

  • Re: How do I create a simple table? DataGrid seems very complicated
    ... reflect the information for the currently selected channel. ... seemed more simple than a "bound" DataGrid for what I needed. ... handles interacting with this piece of hardware I'm using. ... TableLayoutPanel and manage the individual controls myself. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: The revelation of St. f0dder the Divine
    ... Even for Microsoft, that would be an error of the highest ... for them...you CANNOT have such a "casual" attitude to concurrency on ... You simply could not get Windows to operate at all, ... how can it only effect specific hardware? ...
    (alt.lang.asm)
  • Re: Advertising "Linux Compatible"
    ... The OEM hardware comes with a Windows Driver. ... natively support that particular piece of hardware. ... Windows by developing drivers themselves. ...
    (alt.os.linux)
  • Re: Device Driver that uploads its own code?
    ... driver to implement an adaptive timing loop; ... respond/interact with hardware with microsecond precision. ... real-time and linear, the idea of fluctuating state and variable latency ... where the connection to Windows is largely ...
    (microsoft.public.win32.programmer.kernel)
  • Re: CPU runing at 100%, help
    ... Could be hardware - but.. ... Clean up and find out.. ... using Windows XP "prettifications". ... You should at least turn on the built in firewall. ...
    (microsoft.public.windowsxp.perform_maintain)