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



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?

.



Relevant Pages

  • Re: Zero Width Pen Draws through clipped region...
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Exclude the rectangle from the graphics clip region. ... IF you use a pen that is more than one pixel the clipping works ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Partial zooming using transform
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... Is there any "good way" of figuring out the dimensoions of the transformed image to get the size of the border I need to draw? ... the "object" will be a square or a slice of pixels with its own individual zoom and transform. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Scrolling question
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... protected override void OnPaint ... > to scoll just fine, but at least for me, the Sine wave will not scroll ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Rotate ellipse around center
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs ... > ellipse what so erver. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Zero Width Pen Draws through clipped region...
    ... Find great Windows Forms articles in Windows Forms Tips and Tricks ... >> Exclude the rectangle from the graphics clip region. ...
    (microsoft.public.dotnet.framework.drawing)

Loading