DataGridTableStyle and relationship

Discussion in 'ASP .Net' started by dbuchanan, Nov 29, 2005.

  1. dbuchanan

    dbuchanan Guest

    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, Nov 29, 2005
    #1
    1. Advertising

  2. dbuchanan

    dbuchanan Guest

    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
     
    dbuchanan, Nov 29, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Floela

    DataGridTableStyle in ASP.NET?

    Floela, Jul 10, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    518
    Floela
    Jul 10, 2003
  2. Ken Cox [Microsoft MVP]

    Re: Relationship between IIS Sessions and ASP.NET Sessions?

    Ken Cox [Microsoft MVP], Aug 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    5,420
    Luther Miller
    Aug 8, 2003
  3. Carlos

    DataGridTableStyle Problem

    Carlos, Feb 2, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,221
    Carlos
    Feb 3, 2004
  4. tshad
    Replies:
    0
    Views:
    380
    tshad
    Aug 28, 2007
  5. Jürgen Steinmetz

    BLL-Class binding to a DataGrid using DataGridTableStyle

    Jürgen Steinmetz, Aug 13, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    153
    Jürgen Steinmetz
    Aug 13, 2003
Loading...

Share This Page