Results 1 to 3 of 3

Thread: How can I use fill from a typed dataset to be applied to my datagridview datasource?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2013
    Location
    Minneapolis, MN
    Posts
    531

    How can I use fill from a typed dataset to be applied to my datagridview datasource?

    Hello:

    I have a typed dataset query that produces exactly what I want. How can I use fill from a typed dataset to be applied to my datagridview datasource?

    Code:
        Private Sub frmHistory_Load(sender As Object, e As EventArgs) Handles Me.Load
            Dim Requester As String = frmRequest.cboRequestor.Text
    
            MessageBox.Show(Requester)
    
            Dim ta_History As PurchasingRequestDataSetTableAdapters.PartsTableAdapter = New PurchasingRequestDataSetTableAdapters.PartsTableAdapter
            ta_History.FillBy_GetHistory(DS.Parts, "Jerome Vanderlinde")
    
            ' How can I use the fill above to be applied to my datagridview datasource?
            dgvHistory.DataSource = TBD
    
        End Sub
    Thanks!
    - A 'Hyperactive Member' trying to make a difference in a hyperactive world! And recently, I've been promoted to a 'Finatic Member,' whatever that means!

  2. #2
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: How can I use fill from a typed dataset to be applied to my datagridview datasour

    Ummmm... by assigning the datatable to the datasource... just like you would anything else... Using a typed dataset doesn't really change anything.
    Code:
       Private Sub frmHistory_Load(sender As Object, e As EventArgs) Handles Me.Load
            Dim Requester As String = frmRequest.cboRequestor.Text
    
            MessageBox.Show(Requester)
    
            Dim ta_History As PurchasingRequestDataSetTableAdapters.PartsTableAdapter = New PurchasingRequestDataSetTableAdapters.PartsTableAdapter
            ta_History.FillBy_GetHistory(DS.Parts, "Jerome Vanderlinde")
    
            ' How can I use the fill above to be applied to my datagridview datasource?
            dgvHistory.DataSource = DS.Parts
    
        End Sub
    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2013
    Location
    Minneapolis, MN
    Posts
    531

    Re: How can I use fill from a typed dataset to be applied to my datagridview datasour

    DS.Parts just returns the entire table, all cells in an undesired order. The query spits out the data in the desirable order, with fewer fields. This is what I am trying to control.

    Thoughts on this? Thanks!
    - A 'Hyperactive Member' trying to make a difference in a hyperactive world! And recently, I've been promoted to a 'Finatic Member,' whatever that means!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width