Link to home
Start Free TrialLog in
Avatar of davidrichardson
davidrichardson

asked on

Search DataGrid

I am currently using the following code to search a datagrid

DsLocation.Tables("tblscanorder").DefaultView.Sort = "SalesOrder"
        BindingContext(DsLocation, "tblscanorder").Position = DsLocation.Tables("tblscanorder").DefaultView.Find(TxbSearch.Text)

The field saleorder have 9 characters, I want to be able to do the search on the last 5 only as the first 4 are always the same

Example

Sales order = SOR079377

So I want to search for 79377
Avatar of Hans Langer
Hans Langer

use the EndsWith property of the string object.

str.EndsWith("79377")
Avatar of davidrichardson

ASKER

could you give me a bit more information, Where would i use this
ASKER CERTIFIED SOLUTION
Avatar of Hans Langer
Hans Langer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That Works Great

Thanks