Skip to content

How to show data from another table based on foreign key? #16

Description

@tahiryasin

I have a custom dropdown attribute (vendor_id) for products.

The dropdown is populated from a custom table vendors (entity_id, name). Now with this extension I am able to add Vendor column in products grid that shows vendor_id but I want to display name. And the search should also work on name rather than entity_id.

My gridcontrol.xml

<?xml version="1.0"?>
<gridcontrol>
    <grids>
        <!-- grid id -->
        <productGrid>
            <vendor_id>
                <add>
                    <header>Vendor</header>
                    <type>text</type>
                    <index>vendor_id</index>
                </add>
                <after>name</after>
            </vendor_id>
        </productGrid>
    </grids>
</gridcontrol>

Can you please tell if this already possible or need custom coding?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions