DataGrid vs. DataGridView

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Whitworth

    DataGrid vs. DataGridView

    I must be overlooking something obvious here. I've constructed a dataset,
    which I can bind to a DataGrid with no issues.

    From the code below, what more do I need to do to get the same dataset to
    bind to a DataGridView?

    Thanks

    John


    Dim AppDataSet As New DataSet()
    AppDataSet = New DataSet()
    AppDataSet.Tabl es.Add(AppTable )

    Dim AppDataWindow As New AppData
    AppDataWindow.A ppDataGrid.SetD ataBinding(AppD ataSet,
    EmvApplic(EmvAp p).Name)

    Dim AppDataGridView BS As BindingSource
    AppDataGridView BS = New BindingSource
    AppDataGridView BS.DataSource = AppDataSet
    AppDataWindow.A ppDataGridView. DataSource = AppDataGridView BS

    'AppDataWindow. Name = EmvApplic(EmvAp p).Name
    AppDataWindow.S how()


  • John Whitworth

    #2
    Re: DataGrid vs. DataGridView


    "John Whitworth" <sexyjw@gEEEEEE EEEEEEEEEEmail. comwrote in message
    news:eWBuut3RJH A.4512@TK2MSFTN GP02.phx.gbl...
    >I must be overlooking something obvious here. I've constructed a dataset,
    >which I can bind to a DataGrid with no issues.
    >
    From the code below, what more do I need to do to get the same dataset to
    bind to a DataGridView?
    >
    Thanks
    >
    John
    >
    >
    Dim AppDataSet As New DataSet()
    AppDataSet = New DataSet()
    AppDataSet.Tabl es.Add(AppTable )
    >
    Dim AppDataWindow As New AppData
    AppDataWindow.A ppDataGrid.SetD ataBinding(AppD ataSet,
    EmvApplic(EmvAp p).Name)
    >
    Dim AppDataGridView BS As BindingSource
    AppDataGridView BS = New BindingSource
    AppDataGridView BS.DataSource = AppDataSet
    AppDataWindow.A ppDataGridView. DataSource = AppDataGridView BS
    >
    'AppDataWindow. Name = EmvApplic(EmvAp p).Name
    AppDataWindow.S how()
    I've solved it...the BindingSource has to be AppTable, and not AppDataSet.

    JW


    Comment

    Working...