473,780 Members | 2,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid Display from lookup table.

Hi
I need a dropdown list column in a datagrid control, and I've got the
basics working where the column contents is text. However the data
table stores a foreign key to a lookup table so I need to convert
between ID and Text. Again I've got most of this working but I'm stuck
on one point, which probably does not involve the dropdown.

How can I display the Lookup name in the column when I'm not editing?
It always displays the key ID (which I would expect). I need to
override the code than puts the contents into the cell, so I can do a
lookup in the second table. Can someone tell me where to get to this
code?

I hope that makes sense.

Cheers

John South
Pangbourne UK

Nov 23 '05 #1
0 1196

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4050
by: Faith | last post by:
I found code on www.codeproject.com. Here is a sample it is called DataGridColumnDropDown. I modified it to use the text box when I wanted it to depended on a certain search criteria. Public Class ExtendedSearchFieldValueColumnStyle Inherits DataGridTextBoxColumn Public WithEvents ColumnComboBox As ComboBox Public WithEvents ColumnTextBox As TextBox
3
2548
by: Diego TERCERO | last post by:
Hi... I'm working on a tool for editing text resources for a family of software product my company produces. These text resources are found in a SQL Server database, in a table called "Resource" with the following structure : Resource{,en,fr,es} Yes.. these are the only languages supported actually. A couple of rows in that table would look like this :
5
1348
by: Kevin | last post by:
Hi Al I have two questions about a datagrid, I need to decide which way to go.... I have a datagrid that will show me all the entries in a table. When I click on any cell(actually I would prefer if It could rather select the whole row, where ever I click), I want the data in that datagrid to populate the corresponding textbaoxes on my form, so that the user can edit the values and save them back to the database, and the update the...
3
1273
by: Steve B. | last post by:
How to I get the relating table Text entries to show in the datagrid instead of the corresponding relating table row id numbers? The DataMember/DataSet of the DataGrid is a relational MS-Access table (called: "Main"). This Main Table has several linked lookup tables. The problem is the DataGrid shows (for table columns with lookup tables) the row ID numbers (keys) of these linked/relational tables instead of the text entries for those...
4
2585
by: Vik | last post by:
How can I display the lookup values in a datagrid? E.g., the datagrid displays a table that contains a ProductID field. I want to display a Product description from a Product table in that datagrid. Currently I use a join between the main table and the lookup table to get the Product description. Is it possible to use a dropdownlist in the datagrid to display and select (in Edit mode) the lookup values? Thank you.
2
1494
by: MichaelY | last post by:
Ok...I'm gonna regret this...but here goes....(promise I'm not trolling) After several years of using the provided ASP.NET data display controls (DataGrids, Repeaters, and now the GridView amoung others), I cannot deny that there is an ENORMOUS amount of functionality crammed into these controls - kudos to MS!!! However, more and more, I have been encountering situations where I need EXPLICIT control over the rendered HTML in a grid...
0
1262
by: dbuchanan | last post by:
Hello, For my datagrid I added a datagrid table style to include columns from my lookup tables. These display the values in the lookup tables rather than just the integer key value stored in the data table. When I make selections in bound combo boxes on the form and save the changes the datagrid which is populated by the following stored procedure does not reflect the changes for the referenced lookup tables until I close and reload...
3
2291
by: dbuchanan | last post by:
Hello, (Windows forms - SQL Server) I fill my datagrid with a stored procedure that includes relationships to lookup tables so that users can see the values of the combobox selections rather than the key value that are stored in the table. It works well if the comboboxes are selected when the row is created.
0
1307
by: Familjen Karlsson | last post by:
Hi I have downloaded some code and tried it and nothing happens with the datagrid. Explain what is wrong and what I have to do please. I have tried to Import the namespace Hamster and it didn't work. Explain what I have to do to make that work. Fia Imports System Imports System.Windows.Forms
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10139
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9931
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6727
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2869
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.