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
        dgvUserDetails.Columns.Add(col_Prof)

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?

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.