Solved

Binding a specific record

Posted on 2006-06-29
1
172 Views
Last Modified: 2010-04-23
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
Comment
Question by:setsquare
1 Comment
 
LVL 96

Accepted Solution

by:
Bob Learned earned 125 total points
ID: 17010665
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
update textboxes with Streamreader 21 47
Creating a route in asp.net webforms 2 25
SQL LINE CONTINUATION ISSUE 12 33
SqlServer no dupes 25 34
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question