Grid ExcelExport throws a NullReferenceException when using a foreignkey column with datasource

Hi

I've the following Grid columns definition.
                    <div e-columns>
                        <div e-column e-field="Id" e-width="20" e-allowediting="false" e-isprimarykey="true"></div>
                        <div e-column e-field="OrderId" e-width="20" e-allowediting="false" ></div>
                        <div e-column e-field="ProductId" e-width="120" e-foreignkeyfield="Id" e-foreignkeyvalue="Name" e-datasource="products" e-edittemplate="autoComplete"></div>
                        <div e-column e-field="Quantity" e-width="50" e-edittype="numericedit"></div>
                        <div e-column e-field="Condition" e-width="50" e-edittype="numericedit"></div>
                        <div e-column e-field="Price" e-width="50" e-textalign="right" e-edittype="numericedit"></div>
                        <div e-column e-field="Discount" e-width="20" e-allowediting="false" ></div>
                        <div e-column e-field="Total" e-width="50" e-allowediting="false" e-textalign="right"></div>
                    </div>
When using the ProductId column the ExcelExport throws a NullRefereceException, otherwise, when that column is commented out, it works pretty fine.

Any suggestion how to resolve that issue?


1 Reply

TS Thavasianand Sankaranarayanan Syncfusion Team June 22, 2018 12:50 PM UTC

Hi Islam, 

Thanks for contacting Syncfusion support. 

As per your given detail we found that you want to export the Grid with foreignKey field column in Grid.  

We have already discuss about the above mention query in the following knowledge base documentation. 


Regards, 
Thavasianand S. 


Loader.
Up arrow icon