Solved

Binding a specific record

Posted on 2006-06-29
1
169 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

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…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now