Click here to Skip to main content
15,902,635 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionError opening serial port that work before Pin
albchinsh7-Apr-10 22:31
albchinsh7-Apr-10 22:31 
AnswerRe: Error opening serial port that work before Pin
Steven J Jowett8-Apr-10 5:23
Steven J Jowett8-Apr-10 5:23 
GeneralRe: Error opening serial port that work before Pin
albchinsh8-Apr-10 5:51
albchinsh8-Apr-10 5:51 
GeneralRe: Error opening serial port that work before Pin
DaveAuld8-Apr-10 6:25
professionalDaveAuld8-Apr-10 6:25 
GeneralRe: Error opening serial port that work before Pin
albchinsh8-Apr-10 18:29
albchinsh8-Apr-10 18:29 
AnswerRe: Error opening serial port that work before Pin
Luc Pattyn8-Apr-10 20:07
sitebuilderLuc Pattyn8-Apr-10 20:07 
GeneralRe: Error opening serial port that work before Pin
albchinsh9-Apr-10 18:13
albchinsh9-Apr-10 18:13 
Questionvb.net DataView.RowFilter not working Pin
dodaddydo7-Apr-10 16:52
dodaddydo7-Apr-10 16:52 
I have a winform with a datagridview bound to a dataview. I read in various delimited files with the first row as column headers. I build a datatable in memory & then instantiate the dataview and then bind it to the datagridview. I have a modal form that allows the user to select a column from a combobox & enter a list of values in a multiline textbox. I use the user input to set the dataview.rowfilter property but the datagridview only reflects rows with the first value from the list.

Try
           If searchRecords.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then
               Dim filterString As New StringBuilder

               If searchRecords.SearchValues.Count > 1 Then
                   filterString.Append(searchRecords.SelectedColumn)
                   filterString.Append(String.Format(" IN ('{0}'", searchRecords.SearchValues(0).ToString))

                   For i As Integer = 1 To searchRecords.SearchValues.Count - 1
                       filterString.Append(String.Format(",'{0}'", searchRecords.SearchValues(i).ToString))
                   Next

                   filterString.Append(")")
               Else
                   filterString.Append(searchRecords.SelectedColumn)
                   filterString.Append(" = ")
                   filterString.Append(String.Format("'{0}'", searchRecords.SearchValues(0).ToString))
               End If

               _RecordTable.GetView.RowFilter = filterString.ToString
               _RecordTable.GetView.RowStateFilter = DataViewRowState.CurrentRows
           End If

       Catch ex As Exception
           Throw ex
       End Try


So if the user provides more than one value the filter string would look something like this "columnName IN ('value1','value2','value3')". The result in the datagridview displays only rows with value1 in the columnName column. I have used the exact same code to filter a dataview instantiated with a SQL table & it works. I can't figure out why this code does not work & no one I've asked can explain. Please help!
AnswerRe: vb.net DataView.RowFilter not working Pin
Tej Aj7-Apr-10 19:45
Tej Aj7-Apr-10 19:45 
GeneralRe: vb.net DataView.RowFilter not working Pin
dodaddydo8-Apr-10 2:55
dodaddydo8-Apr-10 2:55 
AnswerRe: vb.net DataView.RowFilter not working Pin
Tej Aj7-Apr-10 20:08
Tej Aj7-Apr-10 20:08 
Questionprogress bar Pin
Daniel Engelkes6-Apr-10 17:03
Daniel Engelkes6-Apr-10 17:03 
AnswerRe: progress bar Pin
Anubhava Dimri6-Apr-10 19:45
Anubhava Dimri6-Apr-10 19:45 
AnswerRe: progress bar Pin
KreativeKai7-Apr-10 7:18
professionalKreativeKai7-Apr-10 7:18 
GeneralRe: progress bar Pin
Steven J Jowett7-Apr-10 22:54
Steven J Jowett7-Apr-10 22:54 
GeneralRe: progress bar Pin
KreativeKai9-Apr-10 6:05
professionalKreativeKai9-Apr-10 6:05 
AnswerRe: progress bar Pin
Gregory Gadow7-Apr-10 7:49
Gregory Gadow7-Apr-10 7:49 
Questionbecause it is being used by another process Pin
KreativeKai6-Apr-10 7:56
professionalKreativeKai6-Apr-10 7:56 
AnswerRe: because it is being used by another process Pin
Kschuler6-Apr-10 8:34
Kschuler6-Apr-10 8:34 
GeneralRe: because it is being used by another process Pin
KreativeKai6-Apr-10 9:21
professionalKreativeKai6-Apr-10 9:21 
AnswerRe: because it is being used by another process Pin
Gregory Gadow6-Apr-10 9:07
Gregory Gadow6-Apr-10 9:07 
GeneralRe: because it is being used by another process Pin
KreativeKai6-Apr-10 9:16
professionalKreativeKai6-Apr-10 9:16 
GeneralRe: because it is being used by another process [modified] Pin
Dave Kreskowiak6-Apr-10 10:06
mveDave Kreskowiak6-Apr-10 10:06 
GeneralRe: because it is being used by another process Pin
KreativeKai7-Apr-10 6:22
professionalKreativeKai7-Apr-10 6:22 
Questionfilesystemwatcher and linux Pin
wikus706-Apr-10 3:54
wikus706-Apr-10 3:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.