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

Sync-fusion Blazor dynamic query not working

Thread ID:

Created:

Updated:

Platform:

Replies:

150574 Jan 11,2020 05:36 PM UTC Jan 13,2020 05:39 AM UTC Blazor 1
loading
Tags: Grid
Karan
Asked On January 11, 2020 05:36 PM UTC


Vignesh Natarajan [Syncfusion]
Replied On January 13, 2020 05:39 AM UTC

Hi Karan,  
 
Greetings from Syncfusion support.  
 
Query: ” So any one have any idea what i did wrong in this query ? 
 
From our 2019 Volume 4 release (17.4.0.39) only we have changed the type of Query property to Query class. Before that release, type of Query property will be string. Kindly refer the below release notes about the changes we have done in our Grid for your reference 
 
 
So kindly upgrade to latest version (17.4.0.42  - because we have fixed the many breaking issue after that main release) to resolve the reported query. Also ensure to import the Syncfusion Blazor Data instance in your sample project.  
 
@using Syncfusion.EJ2.Blazor 
@using Syncfusion.EJ2.Blazor.Buttons 
@using Syncfusion.EJ2.Blazor.Data 
@using Syncfusion.EJ2.Blazor.Grids 
 
 
If you want to use the same approach in 17.3.0.21-beta version, then kindly specify the query property value in form of string (like below).  
 
<EjsGrid ModelType="Model" DataSource="@Employees" Height="315px"> 
    <GridTemplates> 
        <DetailTemplate> 
            @{ 
                var employee = (context as EmployeeData);              
                <EjsGrid DataSource="@Orders" Query="@QueryData(employee)"> 
. . . . . .  
                </EjsGrid> 
            } 
        </DetailTemplate> 
    </GridTemplates> 
. . . . . . .. . .  
</EjsGrid> 
 
@code{ 
    public int? Val { get; set; } 
    public EmployeeData Model = new EmployeeData(); 
    public string QueryData(EmployeeData employee) 
    { 
        return $"new ej.data.Query().where('EmployeeID', 'equal', {employee.EmployeeID})"; 
    }   
. . . . . . . ..  
 
    public class EmployeeData 
    { 
        public int? EmployeeID { get; set; } 
        . . . . . . . . .  
    } 
} 
 
Please get back to us if you have further queries.  
 
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