Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

Binding a specific record

Hi gang!

I am trying to create a control panel type application that gets lists of items and sub-items from a webservice and puts them into a dataset. Then the application parses through them to generate ListViewItems with a two part tags e.g. "CNT:ESP" (so I know what to do when its clicked because some are folders and some are items, the example is "Country" and "Spain").

When called I want to call a specific record into a form so items can be changed but I can't get my head around binding with a key rather than a position... especially as some of forms need to access lookup data via a relationship.

Tables look like this:

GEODATA_CURRENCIES
code (EUR/USD/GBP etc)
name (Euro, US Dollar, British Point etc)

GEODATA_COUNTRIES
code (ESP/USA/GBR)
name (Spain, United States, Great Britain)
currency_code (EUR/USD/GBP lookup)

Say for example my user opens the form and wants to see "Spain", how? The tag for the item s/he opens would be CNT:ESP

Thanks!
setsquare
0
setsquare
Asked:
setsquare
1 Solution
 
Bob LearnedCommented:
You could use a filter with the DataTable's DefaultView:

Dim table As DataTable = ds.Tables(0)
table.DefaultView.RowFilter = "code='USD' "

Bob
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now