Brian Thank you so much for replying!!!
The combo box goes in the grid.... At least I would like it to. I'm upgrading an access database where to do master - detail the detail was in a grid and it was really easy to throw in a lookup combo box and would like to keep it the same for the users...
I use a linq query to get items an add them to a node in a treeview... then when the user selects the node I want it fill in the grid with the details... but with one column I need it to be a drop down list and another column I need a checkbox.. here is the code:
Code:
Private Sub TreeView1_NodeMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles TreeView1.NodeMouseClick
Try
If e.Node.Text.Contains("a") Or _
e.Node.Text.Contains("e") Or _
e.Node.Text.Contains("i") Or _
e.Node.Text.Contains("o") Or _
e.Node.Text.Contains("u") Then
Else
Dim SelectedClaimNumber As Integer = CInt(e.Node.Text)
ToolStripStatusLabel1.Text = "Claim Number " & SelectedClaimNumber
ToolStripStatusLabel3.Text = "Notes"
Dim LineItems = From LI In db.ClaimLineItems _
Where LI.ClaimNumber = SelectedClaimNumber _
Select LI
With DataGridView1
.DataSource = LineItems
.Columns(0).Visible = False
.Columns(1).Visible = False
.Columns(4).Visible = False
.Columns(12).Visible = False
.Columns(13).Visible = False
.Columns(14).Visible = False
.Columns(15).Visible = False
.Columns(16).Visible = False
.Columns(17).Visible = False
.Columns(18).Visible = False
.Columns(19).Visible = False
.Columns(20).Visible = False
.Columns(21).Visible = False
End With
Dim ClaimNotes = From CN In db.ClaimNotes _
Where CN.ClaimNumber = SelectedClaimNumber _
Select CN
DataGridView2.DataSource = ClaimNotes
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
This is the bare bones code that works but one of the columns VendorId I want to lookup vendorname in the vendor table. Is that clear enough?
I also want to know if I'm conducting myself the correct way in these forums. I find that I don't get answers like other questions and maybe there is something I don't know about that I'm doing to cause that. Thanks!!
Paul