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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top