How can I bind a Windows Forms Datagrid to a collection?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Michael Kellogg (mkellogg_at_WEDELIVERcc3.com)
Date: 01/21/05


Date: Fri, 21 Jan 2005 11:24:33 -0800

I have a collection of custom objects that I am displaying in a Windows
Forms Datagrid. To display it, I take the collection and build a DataTable
object on the fly, then set the grid's DataSource to the DataTable. The
code for this is lengthy and the grid is obviously not editable. I've read
it's possible to connect my collection directly, and have it be editable,
too. Can anyone point me to a resource that can walk me through this?

TIA

-- 
Michael 


Relevant Pages

  • Re: How can I bind a Windows Forms Datagrid to a collection?
    ... in your custom class will be displayed in the datagrid. ... tablestyle to the datagrid use collection as the mapping name. ... I have a collection of custom objects that I am displaying in a Windows ...
    (microsoft.public.dotnet.languages.vb)
  • how to expand and collapse rows in DataGrid to create parent/child relationships using a single tabl
    ... I am new to Windows Forms and for the past week or so, ... expand/collapse in the DataGrid. ... I want to do, by adding a colum with the +/- buttons, and then hiding ... all rows that are NOT supposed to be displayed and displaying those what ...
    (microsoft.public.dotnet.framework.windowsforms)
  • how to expand and collapse rows in DataGrid to create parent/child relationships using a single tabl
    ... I am new to Windows Forms and for the past week or so, ... expand/collapse in the DataGrid. ... I want to do, by adding a colum with the +/- buttons, and then hiding ... all rows that are NOT supposed to be displayed and displaying those what ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Outlook Express question
    ... You appear to be using XP Classic Windows Theme. ... > ARE two separate strings within the file displaying two separate ... > and the controls are somehow flagged. ...
    (microsoft.public.windowsxp.general)
  • Re: Outlook Express question
    ... You appear to be using XP Classic Windows Theme. ... > ARE two separate strings within the file displaying two separate ... > and the controls are somehow flagged. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)