1,105,375 Community Members

how to fill datagridview textbox column from dataset

Member Avatar
Light Poster
36 posts since Nov 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]

I have datagridview which contains total 14 columns out of which first 9 columns are filled from one table("datafile") and other 5 columns i have added programatically as shown below.

Dim col_Prof As New DataGridViewTextBoxColumn()
        With col_Prof
            .Name = "xx"
            .HeaderText = "xx"
            .ReadOnly = False
        End With

Now I want this column to be filled from another table("Prof") and bind to grid.Is it possible to do so?if yes how?

Member Avatar
Posting Shark
912 posts since Oct 2008
Reputation Points: 145 [?]
Q&As Helped to Solve: 196 [?]
Skill Endorsements: 7 [?]

You can not bind more tan one datasource to your grid. If the data is only to be shown (not added nor modified) you can create a view, joining the 2 datatables by a relevant criteria.

To help you more, we will need more info about your tables and the technology behind.

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
Tags Related to this Article