How to bind DataGridView to single column in strongly typed DataTable?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Infog
    New Member
    • Dec 2008
    • 36

    How to bind DataGridView to single column in strongly typed DataTable?

    I would like to implement Virtual mode on a DataGridView. The issue is that I'm not sure how to bind to ONLY the ID column in my DataTable without binding to the whole table.

    Adding combobox or textbox columns and handling the CellValueNeeded event is not a problem, I've done that elsewhere in my program.

    I would like to use something like
    Code:
    DataGridView.DataSource = MyDataset.Tables("TableName").Columns("ID")
    , but no data is displayed.

    Is there a way to bind to a single column of data, instead of binding to the whole table and hiding all the (non-custom) columns?
  • kattiegriri
    New Member
    • Aug 2012
    • 1

    #2
    In it Columns are using a user-defined type (I Node) not one of the base .NET Framework data types and Byte[]. I Node have to be marked by the Serializable Attribute at least.For more information visit it dapfor com/en/net-suite/net-grid/tutorial/data-types

    Comment

    Working...