G
Guest
Hello, I'm new on this so please be pacient =)
I'm trying to filter data from a DataView and place de dataview as the
DataSource of a DataGrid.
DsTimeRecording1 --> Dataset
EmployeeID --> GUID
TRDate --> Datetime
dtpDate --> DateTime Picker control on the form
cboName --> ComboBox control on the form; ValueMember = EmployeeID
Error Message --> Operation is not valid for type GUID and string " And
TRDate = "
Code -->
Dim tbl As DataTable = DsTimeRecording1.Tables("TimeRecording")
Dim dv As DataView = New DataView(tbl)
dv.RowFilter = "[EmployeeID] = " & Me.cboName.SelectedValue + " And
TRDate = " & dtpDate.Value
dgTimeRecording.DataSource = dv
Thanks!
I'm trying to filter data from a DataView and place de dataview as the
DataSource of a DataGrid.
DsTimeRecording1 --> Dataset
EmployeeID --> GUID
TRDate --> Datetime
dtpDate --> DateTime Picker control on the form
cboName --> ComboBox control on the form; ValueMember = EmployeeID
Error Message --> Operation is not valid for type GUID and string " And
TRDate = "
Code -->
Dim tbl As DataTable = DsTimeRecording1.Tables("TimeRecording")
Dim dv As DataView = New DataView(tbl)
dv.RowFilter = "[EmployeeID] = " & Me.cboName.SelectedValue + " And
TRDate = " & dtpDate.Value
dgTimeRecording.DataSource = dv
Thanks!