DataGridTableStyle and relationship

D

dbuchanan

Hello,

I am using Win forms VB 2003

When my form loads I fill two tables that have a relationship between
them. One table1 is the main data table. Table2 is a lookup table. The
Table1 stores the key from Table2 . The goal is to display the value
from Table2 in the DataGrid as if it were a field in Table1. I hoped to
do this by using the DataGridTableStyle by mapping the columns name to
the row. I tried it a couple of ways without success.

Here is may last attempt
\\
'Map to the keyed value ~ cmSmallint01 = lkp104Voltage.Voltage
Dim dgtbcSystemVoltage As New DataGridTextBoxColumn
With dgtbcSystemVoltage
.MappingName = "lkp104Voltage.Voltage"
.HeaderText = "Voltage"
.Width = 60
End With
dgts.GridColumnStyles.Add(dgtbcSystemVoltage)
//

How can I do this?

Thank you,
dbuchanan
 
D

dbuchanan

I found the answer.

This was answered for me under different circumstances by Bart Mermuys
in the thread "How to update datagrid when it displays lookup table
values"

dbuchanan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top