Solved

Datagrid column to display description instead of ID.

Posted on 2004-08-12
2
154 Views
Last Modified: 2010-04-23
Okay, another question from the Newbie.

I have a dataset called dsPOLookup which consists of two tables.
POHEADER and STATUS (they are linked by POHEADER.PO_STATUS and STATUS.STATUS_ID)

I have a dataview dvPOHeader which uses dsPOLookup.POHEADER as its' table.

I have a datagrid which uses dvPOHeader as its' DataSource

When I populate the datagrid, I want the Status column to contain the STATUS_DESC from the status table instead of displaying PO_STATUS from PO_HEADER.
Is this possible? Can a dataview contain more than one table? If so, how? I am using the properties dialog to set these values, perhaps I have to write some code?!

Please let me know if you can help.

THanks and Regards,
Marnie.
0
Comment
Question by:MarnieHook
2 Comments
 
LVL 2

Accepted Solution

by:
waterhidden earned 50 total points
ID: 11781479

of course it is possible. you have to change the commandtext which fills dvPOHeader. if you send the command texts you use, i'll try to help you more specific.



0
 

Author Comment

by:MarnieHook
ID: 11789214
Hi there,
THankyou for your response.

I'm not sure what you mean by the commandText as in the properties of the dataview it only has a property called 'Table'. THis is where I have specified 'DsPOLookup1.POHeader' as the table. I don't think I can specify more than one table or a 'Select query' for that matter.

I just read the online help regarding dataviews and it says you can't have multiple tables for a dataview:

'However, a DataView differs significantly from a database view in that the DataView cannot be treated as a table and cannot provide a view of joined tables. You also cannot exclude columns that exist in the source table, nor can you append columns, such as computational columns, that do not exist in the source table.'

Perhaps I have to retrieve the status_desc as the rows are populated in the table? Is there an event associated with the insertion of each row in the table as it populates? If so, is this a good place to put the lookup to find the Status_desc?

I'll have to investigate further.

Thanks again,
Marnie.


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with checking if excel exist in client's computer 9 43
Tabcontrol Caption? 1 31
Check if number is currency 15 32
Help with solving error related to resources file 4 36
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 …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

863 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

26 Experts available now in Live!

Get 1:1 Help Now