MVLIS
asked on
.net datagridview
I have a datagridview with 2 field in it. When I query a database for some reason it end up with more fields than I have selected and added to the grid.
Public Class InspectData
Private Context As DataContext
Private Sub InspectData_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'Connection settings
Context = New DataContext(True)
Using cf As New Util.ConnectionForm
cf.ShowDialog()
Context.Connect(cf.Server, cf.PortNumber, cf.Partition, cf.UserName, cf.Password)
End Using
Engine.Text = InspectStatus.engine.Text
Engine.Text = "FD620DA00001"
If String.IsNullOrEmpty(Engin e.Text) Then
Engine.Text = "Please Scan Engine Here."
Else
Dim location As String = "I"
Dim columns = M_METPCols.M_ETDS + M_METPCols.M_EARL
'retrieve engine scanned from engine master
Dim troubles = Context.M_METP.RetrieveLis t(columns, M_METPExprs.M_EARL = "I")
Engine.Text = "FD620DA00001"
' Display the result in the grid view
Me.TroubleCodes.DataSource = troubles
End If
End Sub
End Class
list.png
Public Class InspectData
Private Context As DataContext
Private Sub InspectData_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'Connection settings
Context = New DataContext(True)
Using cf As New Util.ConnectionForm
cf.ShowDialog()
Context.Connect(cf.Server,
End Using
Engine.Text = InspectStatus.engine.Text
Engine.Text = "FD620DA00001"
If String.IsNullOrEmpty(Engin
Engine.Text = "Please Scan Engine Here."
Else
Dim location As String = "I"
Dim columns = M_METPCols.M_ETDS + M_METPCols.M_EARL
'retrieve engine scanned from engine master
Dim troubles = Context.M_METP.RetrieveLis
Engine.Text = "FD620DA00001"
' Display the result in the grid view
Me.TroubleCodes.DataSource
End If
End Sub
End Class
list.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER