We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,916 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

how to fill datagridview textbox column from dataset

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?

2
Contributors
1
Reply
1 Week
Discussion Span
4 Months Ago
Last Updated
3
Views
Rachna0309
Light Poster
36 posts since Nov 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

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.

lolafuertes
Practically a Posting Shark
889 posts since Oct 2008
Reputation Points: 164
Solved Threads: 189
Skill Endorsements: 5

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0549 seconds using 2.64MB