Excel Filtering causes error on GridForeignColumn when Field and ForeignKeyField are different

I'm working with a database where all primary keys for a given table are called "Id".  The below config is working great for inserting, updating, deleting, etc.  It is correctly displaying the text instead of the Id in the grid. It is correctly rendering the dropdown selection when adding, and updating.  The grid is configured to use FilterType.Excel.  All columns are showing the filtering options correctly except for this one:

<GridForeignColumn TValue="SaleType" Field="SaleTypeId" ForeignKeyField="Id" HeaderText="Sale Type" ForeignKeyValue="Name">

<SfDataManager Url="/api/SaleType" Adaptor="Adaptors.UrlAdaptor" />

</GridForeignColumn>

When clicking on the filter icon for the column, it renders the dialog without the filter items



The error is: 

Unhandled exception rendering component: Value cannot be null. (Parameter 'source')

Is there a way to specify the correct field/id to the filter to be able to render the filter item?


1 Reply

NP Naveen Palanivel Syncfusion Team September 26, 2022 06:19 PM UTC

Hi Chris,


Greetings from Syncfusion support.


We checked your query and we like to inform that ,As per  the similar exception we already logged as a bug and it will be fix in upcoming volume 3 release. Can you ensure your sample to pervious version once from your side It works well in pervious version (20.1.0.57) after the Version(20.1.0.57 ) it does not works. If you still facing the issue in old version(20.1.0.57) , Please kindly get back to us


Please let us know if you have any concerns.


Regards,

Naveen Palanivel


Loader.
Up arrow icon