tags:

views:

11

answers:

1

There is something wrong with my filter expression it isnt working. I am simply trying to return the rows that have a CompanyID of mCurrentID. objts is a datatable

Dim mCurrentID As String = lookupInTrenCustomer.EditValue
        'populate grid here
        Dim mFilter As String = "CompanyID=" & mCurrentID
        Dim sortOrder As String = "RegionalBarn DESC"
        objts.Select(mFilter, sortOrder)


        objta.Fill(objts)
        objGridControl.DataSource = objts
+1  A: 

If CompanyID is´nt a numeric value, you need enclose it with quotes.

Dim mFilter As String = "CompanyID='" & mCurrentID & "'"

x77