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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Syntax for sorted-colums tag

Thread ID:





129999 Apr 13,2017 03:40 PM UTC Apr 14,2017 10:25 AM UTC ASP.NET Core 2
Tags: Grid
R Brian Lindahl
Asked On April 13, 2017 03:40 PM UTC

I'm trying to set the default sorting. I know I need to add

<e-sort-settings sorted-columns="????" />

where the razor version would have been

.SortSettings(sort => sort.SortedColumns(col => col.Field("Name").Direction(SortOrder.Ascending).Add()))

What's the syntax for the tag helper version?

R Brian Lindahl
Replied On April 14, 2017 12:39 AM UTC

Figured out to use <e-sorted-columns> instead. Needs better documentation, like a lot of Core does.

Mani Sankar Durai [Syncfusion]
Replied On April 14, 2017 10:25 AM UTC

Hi Brian 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we can perform the sorted columns using tag helper based on the following way. 
Refer the code example 
<ej-grid id="Grid" datasource=ViewBag.datasource allow-paging="true" allow-sorting="true" allow-multi-sorting="true" > 
            <e-sorted-column field="CustomerID" direction="Ascending" /> 
            <e-sorted-column field="Freight" direction="Ascending" /> 

Also based on your suggestion we will complete the document and let you know once we refreshed online. 

Please let us know if you need further assistance. 

Manisankar Durai. 


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

or the page will be automatically redirected to 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