Groups | Blog | Home
all groups > dotnet faqs > november 2005 >

dotnet faqs : DataGridTableStyle and relationship


dbuchanan
11/29/2005 7:08:24 AM
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
dbuchanan
11/29/2005 10:39:45 AM
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
AddThis Social Bookmark Button