Re: How do I create a simple table? DataGrid seems very complicated
- From: "Bob Powell [MVP]" <bob@xxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Aug 2008 20:08:01 +0200
If the objects that you want to display, the thing that defines the columns,
implement INotifyPropertyChange and the collection of objects that define
the rows supports one of the databinding enabled interfaces such as
IBindingList then the configuration of the grid can be as simple as
databinding the collection. One line of code.
--
--
Bob Powell [MVP]
Visual C#, System.Drawing
Ramuseco Limited .NET consulting
http://www.ramuseco.com
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
<longbrmb@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?
.
- References:
- Prev by Date: Re: How do I create a simple table? DataGrid seems very complicated
- Next by Date: PictureBox Control
- Previous by thread: Re: How do I create a simple table? DataGrid seems very complicated
- Next by thread: PictureBox Control
- Index(es):
Relevant Pages
|
Loading