Solved

Datagrid column to display description instead of ID.

Posted on 2004-08-12
2
160 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

615 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