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.
Unfortunately, activation email could not send to your email. Please try again.

Syntax for sorted-colums tag

Thread ID:

Created:

Updated:

Platform:

Replies:

129999 Apr 13,2017 11:40 AM Apr 14,2017 06:25 AM ASP.NET Core 2
loading
Tags: Grid
R Brian Lindahl
Asked On April 13, 2017 11:40 AM

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 13, 2017 08:39 PM

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 06:25 AM

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-sort-settings> 
        <e-sorted-columns> 
            <e-sorted-column field="CustomerID" direction="Ascending" /> 
            <e-sorted-column field="Freight" direction="Ascending" /> 
        </e-sorted-columns> 
    </e-sort-settings> 
 
   <e-columns> 
... 
  </e-columns> 
</ej-grid> 
 

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. 

Regards, 
Manisankar Durai. 


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.

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.

;