Multiple ForeignColumns Same Key

I am trying to create a grid with several columns from a remote datasource. Creating one GridForeignColumn is no issue, however when I try and create more using the same foreignKeyField, I get an error stating "System.ArgumentException: An item with the same key has already been added. Key: ShowName"

<SfGrid TValue="DeliveryInfo" Height="700" AllowExcelExport="true" AllowTextWrap="true" AllowFiltering="true" AllowSorting="true" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Update", "Cancel" })" AllowPaging="false" EnableVirtualization="false" EnableColumnVirtualization="false">
        <SfDataManager AdaptorInstance="@typeof(DeliveryInfoAdaptor)" Adaptor="Adaptors.CustomAdaptor"></SfDataManager>
        <GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.Excel"> </GridFilterSettings>
        <GridTextWrapSettings WrapMode="WrapMode.Header"></GridTextWrapSettings>
        <GridPageSettings PageSize="8"></GridPageSettings>
        <GridEditSettings AllowEditing="true" AllowDeleting="true" AllowAdding="true" Mode="@EditMode.Normal"></GridEditSettings>
        <GridSortSettings>
            <GridSortColumns>
            </GridSortColumns>
        </GridSortSettings>
        <GridColumns>
            <GridColumn Field=@nameof(DeliveryInfo.PitchDayFS) HeaderText="Pitch Day" AllowFiltering="false" AllowSorting="false" TextAlign="TextAlign.Center" Width="200"></GridColumn>
            <GridColumn Field=@nameof(DeliveryInfo.WeekendPitch ) HeaderText="Pitch Sat/Sun" AllowFiltering="false" AllowSorting="false" TextAlign="TextAlign.Center" Width="200"></GridColumn>
            <GridColumn Field=@nameof(DeliveryInfo.ShowName) HeaderText="ER Folder Name / Show Name" IsPrimaryKey="true" AllowFiltering="false" AllowSorting="false" TextAlign="TextAlign.Left" Width="240"></GridColumn>
            <GridForeignColumn TValue="Playlist" Field=@nameof(DeliveryInfo.ShowName) HeaderText="Status" ForeignKeyValue="Status" Width="150">
                <SfDataManager AdaptorInstance="@typeof(PlaylistsAdaptor)" Adaptor="Adaptors.CustomAdaptor">
                </SfDataManager>
            </GridForeignColumn>
            <GridForeignColumn TValue="Playlist" Field=@nameof(DeliveryInfo.ShowName) HeaderText="ShowName" ForeignKeyValue="ShowName" Width="150">
                <SfDataManager AdaptorInstance="@typeof(PlaylistsAdaptor)" Adaptor="Adaptors.CustomAdaptor">
                </SfDataManager>
            </GridForeignColumn>
        </GridColumns>
    </SfGrid>

1 Reply 1 reply marked as answer

RS Renjith Singh Rajendran Syncfusion Team October 28, 2020 09:36 AM UTC

Hi JP, 

Greetings from Syncfusion support. 
 
We have confirmed it as a bug and logged the defect report “Using multiple GridForeignColumn with same Field name throws exceptionfor the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming bi-weekly release which is expected to be rolled by the mid of November, 2020. 
    
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.    

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran 


Marked as answer
Loader.
Up arrow icon