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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

FilterType.Excel

Thread ID:

Created:

Updated:

Platform:

Replies:

149972 Dec 16,2019 05:24 PM UTC Dec 17,2019 10:48 AM UTC Blazor 1
loading
Tags: Grid
Jonathan Nordell
Asked On December 16, 2019 05:24 PM UTC

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?

Vignesh Natarajan [Syncfusion]
Replied On 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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon