We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

FilterType.Excel

I have a grid that I am using the filter type of FilterType.Excel.  Within the grid I have a Template defined on a GridColumn.

<GridColumn Field="DocumentId" HeaderText="Document" Width="100" ValidationRules="@(new { required= true })" >
<Template Context="docCtx">
@{
var doc = (docCtx as EDIData.Models.Display.Attribute);
<span>@doc.Document.Direction / @doc.Document.Name</span>
}
</Template>
</GridColumn>

My issue is that the filter is showing the values of DocumentId (numeric) vs the display values from the Template definition.  How can I control the display of the selectable values in the Excel like filter?

1 Reply

VN Vignesh Natarajan Syncfusion Team December 17, 2019 10:48 AM UTC

Hi Jonathan,  

Thanks for contacting Syncfusion forums. 

Query: “My issue is that the filter is showing the values of DocumentId (numeric) vs the display values from the Template definition 

Data operations like filtering, grouping, sorting, CRUD will take place based on the Field property value. Since you have defined Field property with DocumentId, filtering values will be based on the that column only. From your code example, we suspect that you want to display value from another table similar to foreign key behavior.  

If yes, we have provided support for ForeignKey Column, where we display text and in the backend we will process the values. Refer the below UG documentation for your reference 


If above solution does not resolve your query, kindly get back to us with more details about your requirement.    

Regards, 
Vignesh Natarajan. 


Loader.
Live Chat Icon For mobile
Up arrow icon