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



On Aug 27, 10:28 pm, "Dan Tallent" <s...@xxxxxxxxxxxxx> wrote:
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

<longb...@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@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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 athttp://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

Well, after evaluating my options, I decided to just go with a
TableLayoutPanel and manage the individual controls myself. It seemed
like the simplest way to get what I wanted: a table-like presentation
of a number of controls to set the various configuration parameters of
each channel.

I considered using the DataGridView since I could obtain ComboBoxes in
the columns with a DataGridViewComboBoxColumn, but a few of my rows
would have more limited options for some of their parameters that
would require a ComboBox with fewer sections in those rows. As far as
I could tell, all the ComboBoxes in the column would be the same and I
would have to extend the DataGridViewComboBoxColumn class to have
different combo boxes for different rows. So rather than try to adapt
all my stuff to conform to a DataGridView, I decided it would make
things simpler if I just laid out the controls myself with a layout
manager.

Matt
.



Relevant Pages

  • Re: How do I create a simple table? DataGrid seems very complicated
    ... reflect the information for the currently selected channel. ... If by "windows file manager" you mean Windows Explorer, ... seemed more simple than a "bound" DataGrid for what I needed. ... handles interacting with this piece of hardware I'm using. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Acoustic Guitar Amps?
    ... Channel acoustic guitar, bass & PA amp. ... different controls per use, inc. notch filter on the acoustic channel. ... All effects are in STEREO when using line-out to mixer or other stereo ... Rear stereo line out/headphone jack, effects loop -send/return jacks, ...
    (rec.music.makers.guitar.jazz)
  • Re: Newbie Question!
    ... and creating a crystal report which looks like an employment ... I don't think a datagrid will work here because the date won't be ... BoundColumn nameColumn = new BoundColumn; ... So I won't know how many controls I need until the reader is ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ViewState in a dynamic control
    ... while wrestling with a bug in the Repeater and DataGrid (see the post ... ViewState to bind to, and, I believe, is subsequently used to determine ... The problem with many templated databound controls is that many ... CreateChildControls might get called before LoadViewState occurs. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Sound only
    ... It's a small box with just three easily used dials: channel, ... Alas, for some time now the trend with radios, TV, and audio is to have ... It may be possible to find a Digital TV (DTTV) receiver box that can feed ... and use it controls to adjust volume and tone. ...
    (uk.tech.digital-tv)

Loading