Skip to content
Open
4 changes: 2 additions & 2 deletions ej2-asp-core-mvc/listview/EJ2_ASP.MVC/ej1-api-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publishingplatform: ##Platform_Name##
documentation: ug
---

# Migration from Essential<sup style="font-size:70%">&reg;</sup> JS 1
# EJ1 API migration in ASP.NET MVC ListView component

This article describes the API migration process of ListView control from Essential<sup style="font-size:70%">&reg;</sup> JS 1 to Essential<sup style="font-size:70%">&reg;</sup> JS 2.

Expand All @@ -18,7 +18,7 @@ This article describes the API migration process of ListView control from Essent
| Fields | **Property:** *FieldSettings* <br/><br/> `@Html.EJ().ListView("list").FieldSettings(e => e.Text("text"))` | **Property:** *Fields* <br/><br/> **Inner properties:** *child, enabled, groupBy htmlAttributes, iconCss, id, isChecked etc.* <br/><br/><br/> `@Html.EJS().ListView("list").DataSource((IEnumerable<object>)`<br/>`ViewBag.dataSource).Fields(new Syncfusion.EJ2.Lists.ListViewFieldSettings { GroupBy="type"}).Render()`|
| Template | **Property:** *RenderTemplate* <br/><br/> `@Html.EJ().ListView("list").RenderTemplate(true)`<br/>`.TemplateId("template")` <br/> <br/> `<div id="template"><div>Data 1</div><div>Data 2</div><div>Data 3</div> </div>`| **Property:** *Template* <br/><br/> `@{ var template = "<div class='template'>${text}</div>"; }` <br/><br/> `@Html.EJS().ListView("list").DataSource((IEnumerable<object>)`<br/>`ViewBag.dataSource).Template(template).Render()`|
| Animation | **Not Applicable** | **Property:** *Animation* <br/><br/> `List<object> animation = new List<object>();` <br/> `animation.Add(new { effect = "SlideLeft", duration = "400", easing = "ease" });` <br/><br/> `@Html.EJS().ListView("list").DataSource((IEnumerable<object>)`<br/>`ViewBag.dataSource).Animation(ViewBag.animation).Render()`|
| Enable | **Not Applicable** |**Property:** *Enable* <br/><br/> `@Html.EJS().ListView("list").DataSource((IEnumerable<object>)`<br/>`ViewBag.dataSource).Enable(true).Render()`|
| Enabled | **Not Applicable** |**Property:** *Enable* <br/><br/> `@Html.EJS().ListView("list").DataSource((IEnumerable<object>)`<br/>`ViewBag.dataSource).Enabled(true).Render()`|
| Template for grouping | **Not Applicable** | **Property:** *GroupTemplate* <br/><br/> `@{ var groupTemplate = "<div class='template'>${text}</div>"; }` <br/><br/> `@Html.EJS().ListView("list").DataSource((IEnumerable<object>)`<br/>`ViewBag.dataSource).GroupTemplate(groupTemplate).Render()` |
| Template for header |**Not Applicable** | **Property:** *HeaderTemplate* <br/><br/> `@{ var headerTemplate = "<div class='template'>${text}</div>"; }` <br/><br/> `@Html.EJS().ListView("list").DataSource((IEnumerable<object>)`<br/>`ViewBag.dataSource).HeaderTemplate(headerTemplate).Render()`|
| HTML attributes |**Not Applicable**| **Property:** *HtmlAttributes* <br/><br/> `@{`<br/>`IDictionary<string, object> htmlAttribute = new Dictionary<string, object>();`<br/>`htmlAttribute.Add("class", "listViewCustom");`<br/>`}` <br/><br/> `@Html.EJS().ListView("list").DataSource((IEnumerable<object>)`<br/>`ViewBag.dataSource).HtmlAttributes(htmlAttribute).Render()`|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publishingplatform: ##Platform_Name##
documentation: ug
---

# Migration from Essential<sup style="font-size:70%">&reg;</sup> JS 1
# EJ1 API migration in ASP.NET Core ListView component

This article describes the API migration process of ListView control from Essential<sup style="font-size:70%">&reg;</sup> JS 1 to Essential<sup style="font-size:70%">&reg;</sup> JS 2

Expand All @@ -18,7 +18,7 @@ This article describes the API migration process of ListView control from Essent
| Fields | **Property:** *fieldSettings* <br /> `<ej-list-view enable-group-list=true>`<br/>`<e-field-settings text="text"/>`<br/>`</ej-list-view>` | **Property:** *fields* <br /> **Inner properties:** *child, enabled, groupBy htmlAttributes, iconCss, id, isChecked, isVisible, sortBy, tableName, text, tooltip.* <br/><br/> `<ejs-listview id="list" dataSource="ViewBag.data">`<br/>`<e-listview-fieldsettings groupBy="category" />`<br/>`</ejs-listview>`|
| Template | **Property:** *render-template* <br/> `<ej-list-view id="list" render-template="true" template-id="template"></ej-list-view>` <br/> <br/> `<div id="template"><div>Data 1</div><div>Data 2</div><div>Data 3</div> </div>`| **Property:** *template* <br /> `@{ var template = "<div class='template'>${text}</div>"; }` <br/><br/> `<ejs-listview id="list" dataSource="ViewBag.data" template=@template />`|
| Animation | **Not Applicable** | **Property:** *animation* <br /> `List<object> animation = new List<object>();` <br/> `animation.Add(new { effect = "SlideLeft", duration = "400", easing = "ease" });` <br/><br/> `<ejs-listview id="list" dataSource="ViewBag.data" animation="ViewBag.animation" />`|
| Enable | **Not Applicable** |**Property:** *enable* <br /> `<ejs-listview id="list" dataSource="ViewBag.data" enable="true" />`|
| Enabled | **Not Applicable** |**Property:** *enable* <br /> `<ejs-listview id="list" dataSource="ViewBag.data" enabled="true" />`|
| Template for grouping | **Not Applicable** | **Property:** *groupTemplate* <br /> `@{ var groupTemplate = "<div class='template'>${text}</div>"; }` <br/><br/> `<ejs-listview id="list" dataSource="ViewBag.data" groupTemplate="@groupTemplate" />` |
| Template for header |**Not Applicable** | **Property:** *headerTemplate* <br /> `@{ var headerTemplate = "<div class='template'>${text}</div>"; }` <br/><br/> `<ejs-listview id="list" dataSource="ViewBag.data" headerTemplate="@headerTemplate" />`|
| HTML attributes |**Not Applicable**| **Property:** *htmlAttributes* <br /> `@{`<br/>`IDictionary<string, object> htmlAttribute = new Dictionary<string, object>();`<br/>`htmlAttribute.Add("class", "listViewCustom");`<br/>`}` <br/><br/> `<ejs-listview id="list" dataSource="ViewBag.data" htmlAttributes="htmlAttribute" />`|
Expand Down