Skip to content

Seo 187689 ej2 asp.net core document editor overview page with redirect link #3299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 88 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
0597c5e
documentation(896909):Column headers topic
JamunaSundaramSF3699 Jul 25, 2024
0835f6d
documentation(898958):Column chooser and column resize topic
JamunaSundaramSF3699 Jul 25, 2024
44811aa
documentation(898958):column resize and reorder topic
JamunaSundaramSF3699 Jul 26, 2024
b8245c3
Merge branch 'hotfix/hotfix-v26.2.4' into 898958-columnchooser
JamunaSundaramSF3699 Jul 26, 2024
3197632
documentation(898958):column menu topic
JamunaSundaramSF3699 Jul 29, 2024
a1b6539
documentation(898958):updated
JamunaSundaramSF3699 Jul 29, 2024
22a7292
Merge branch 'hotfix/hotfix-v26.2.4' into 898958-columnchooser
JamunaSundaramSF3699 Jul 29, 2024
d2e0018
documentation(898958):updated
JamunaSundaramSF3699 Jul 29, 2024
37b67fb
Merge branch '898958-columnchooser' of https://github.com/syncfusion-…
JamunaSundaramSF3699 Jul 29, 2024
4c9f0b7
documentation(898958):Updated
JamunaSundaramSF3699 Jul 29, 2024
316b9ee
documentation(896909):Updated
JamunaSundaramSF3699 Jul 30, 2024
581e975
Merge branch 'hotfix/hotfix-v26.2.4' into 896909-columnheader
JamunaSundaramSF3699 Jul 30, 2024
af3d0ff
documentation(896909):Updated issue
JamunaSundaramSF3699 Jul 30, 2024
bd6f806
Merge branch '896909-columnheader' of https://github.com/syncfusion-c…
JamunaSundaramSF3699 Jul 30, 2024
5188e08
documentation(896909):Updated issue
JamunaSundaramSF3699 Jul 30, 2024
224643b
Merge branch 'hotfix/hotfix-v26.2.4' into 896909-columnheader
JamunaSundaramSF3699 Jul 30, 2024
f0a0048
documentation(898958):Updated frozen topic
JamunaSundaramSF3699 Jul 30, 2024
e8bfad3
documentation(898958):Updated changes
JamunaSundaramSF3699 Jul 31, 2024
dcd4798
897352: Adding UG for Redis in collaborative editing
SaranSF4541 Jul 31, 2024
1376580
documentation(898958):Updated
JamunaSundaramSF3699 Jul 31, 2024
efd5126
documentation(896909):Updated
JamunaSundaramSF3699 Jul 31, 2024
1342962
Merge branch '896909-columnheader' of https://github.com/syncfusion-c…
JamunaSundaramSF3699 Jul 31, 2024
066d6ee
Merge branch 'hotfix/hotfix-v26.2.4' into 896909-columnheader
JamunaSundaramSF3699 Jul 31, 2024
776f429
Merge branch 'hotfix/hotfix-v26.2.4' into 898958-columnchooser
JamunaSundaramSF3699 Jul 31, 2024
883fa77
897352: Adding changes in collaborative editing
SaranSF4541 Aug 1, 2024
96141a1
Merge pull request #3250 from syncfusion-content/EJ2-897352-UgRedisMF…
mugunthan-anbalagan Aug 1, 2024
c8b5c31
documentation(900021):Print Topic
JamunaSundaramSF3699 Aug 1, 2024
0ceee71
documentation(898958):Updated
JamunaSundaramSF3699 Aug 4, 2024
0e27d1e
Merge branch '898958-columnchooser' of https://github.com/syncfusion-…
JamunaSundaramSF3699 Aug 4, 2024
6e9e8b1
documentation(898958):Updated align
JamunaSundaramSF3699 Aug 4, 2024
878fdb5
documentation(898958):Updated
JamunaSundaramSF3699 Aug 4, 2024
093f135
documentation(898958):changed
JamunaSundaramSF3699 Aug 4, 2024
9551f7c
documentation(896909):Alignment
JamunaSundaramSF3699 Aug 4, 2024
893814a
Merge branch '896909-columnheader' of https://github.com/syncfusion-c…
JamunaSundaramSF3699 Aug 4, 2024
661fef4
documentation(896909):Alignment
JamunaSundaramSF3699 Aug 4, 2024
e3db27b
documentation(900021):Updated topic
JamunaSundaramSF3699 Aug 4, 2024
c10fefe
documentation(900021):Updated topic
JamunaSundaramSF3699 Aug 4, 2024
15db2cb
documentation(900021):Change content
JamunaSundaramSF3699 Aug 4, 2024
d54a0e5
Merge branch 'hotfix/hotfix-v26.2.4' into 900021-print
JamunaSundaramSF3699 Aug 4, 2024
60c375e
documentation(898958):updated cs file
JamunaSundaramSF3699 Aug 4, 2024
9e245fa
documentation(900021):updated cs file
JamunaSundaramSF3699 Aug 4, 2024
272e10c
Merge branch '900021-print' of https://github.com/syncfusion-content/…
JamunaSundaramSF3699 Aug 4, 2024
40fe146
documentation(900021):updated cs file
JamunaSundaramSF3699 Aug 4, 2024
f0e79e1
documentation(896909):Updated
JamunaSundaramSF3699 Aug 4, 2024
e5de543
documentation(898958):Updated
JamunaSundaramSF3699 Aug 4, 2024
3209d5c
documentation(898958):md updated
JamunaSundaramSF3699 Aug 4, 2024
ebe863d
documentation(898958):Remove file
JamunaSundaramSF3699 Aug 4, 2024
a6966cc
Added the release notes MD file and corresponding node entry in the T…
DeepakRajSundar Aug 5, 2024
960ee8c
documentation(896235):Column rendering topic
JamunaSundaramSF3699 Aug 5, 2024
d4cbed3
Merge branch 'hotfix/hotfix-v26.2.4' of https://github.com/syncfusion…
DeepakRajSundar Aug 6, 2024
eb0e0df
897352: Adding platform name for collaborative editing
SaranSF4541 Aug 9, 2024
a34f48d
Merge pull request #3267 from syncfusion-content/EJ2-897352-UgRedisPl…
mugunthan-anbalagan Aug 9, 2024
a513493
IN-186290 Added the release notes MD file for v26.2.9 and correspondi…
DeepakRajSundar Aug 12, 2024
c6590cb
SEO-187489-ej2-Asp.net-core-NumerictextBox-Getting-Started-Page-with-…
Faith-Atieno Aug 13, 2024
a93d164
Ci resolved
Faith-Atieno Aug 13, 2024
c79998b
Ci resolved
Faith-Atieno Aug 13, 2024
ae019fe
RESOLVED
Faith-Atieno Aug 13, 2024
4fe0d22
Merge branch 'hotfix/hotfix-v26.2.4' into SEO-187489-ej2-Asp.net-core…
Faith-Atieno Aug 15, 2024
9cb767b
resolved
Faith-Atieno Aug 15, 2024
83b41a8
Merge branch 'SEO-187489-ej2-Asp.net-core-NumerictextBox-Getting-Star…
Faith-Atieno Aug 15, 2024
909636c
SEO-187489-ej2-Asp.net-core-Progress-Button-Getting-Started-Page-with…
Faith-Atieno Aug 15, 2024
f238075
SEO-187489-ej2-Asp.net-core-Introduction-Page-with-redirect-link
Faith-Atieno Aug 15, 2024
42b6c6e
Resolved
Faith-Atieno Aug 15, 2024
8fb0ede
Merge branch 'hotfix/hotfix-v26.2.4' into 898958-columnchooser
MaithiliyK Aug 19, 2024
92c9f3a
Merge pull request #3262 from syncfusion-content/896235-column
MaithiliyK Aug 19, 2024
a7d99cf
Merge branch 'hotfix/hotfix-v26.2.4' into 900021-print
MaithiliyK Aug 19, 2024
59d3083
documentation(896909): changed content
JamunaSundaramSF3699 Aug 19, 2024
d433072
Merge branch 'hotfix/hotfix-v26.2.4' into 896909-columnheader
JamunaSundaramSF3699 Aug 19, 2024
e408b94
Merge branch 'hotfix/hotfix-v26.2.4' into 898958-columnchooser
JamunaSundaramSF3699 Aug 19, 2024
066c02e
Merge pull request #3229 from syncfusion-content/898958-columnchooser
MaithiliyK Aug 19, 2024
fba6239
Merge branch 'hotfix/hotfix-v26.2.4' into 896909-columnheader
JamunaSundaramSF3699 Aug 19, 2024
88a760b
Merge pull request #3258 from syncfusion-content/900021-print
MaithiliyK Aug 19, 2024
0084660
Merge branch 'hotfix/hotfix-v26.2.4' into 896909-columnheader
JamunaSundaramSF3699 Aug 19, 2024
7743164
Merge pull request #3225 from syncfusion-content/896909-columnheader
MaithiliyK Aug 19, 2024
4d2429f
IN-186290 Added the release notes MD file for v26.2.10 and correspond…
DeepakRajSundar Aug 19, 2024
cf1ac7a
894666: Added KB.
Aug 20, 2024
b708d20
IN-186290 updated the release notes v26.2.10 node entry in the TOC.ht…
DeepakRajSundar Aug 20, 2024
df04c3f
Merge pull request #3282 from syncfusion-content/EJ2-894666-kb-core-hot
gobalakrishnans Aug 20, 2024
ff95c36
Merge pull request #3275 from syncfusion-content/SEO-187489-ej2-Asp.n…
Girija-Rajendran Aug 20, 2024
2672e37
Merge pull request #3276 from syncfusion-content/SEO-187489-ej2-Asp.n…
Girija-Rajendran Aug 20, 2024
fd3c8f7
Updated the create custom toolbar sample
CCMKarthik123 Aug 21, 2024
65469a1
Merge pull request #3285 from syncfusion-content/899676-Customtoolbar
KameshRajendran Aug 23, 2024
4d2d7d2
Merge pull request #3272 from syncfusion-content/SEO-187489-ej2-Asp.n…
Girija-Rajendran Aug 23, 2024
0e1a496
Added the release notes MD file and corresponding node entry in the T…
DeepakRajSundar Aug 26, 2024
63c5180
documentation(904108): Resolved conflict
JamunaSundaramSF3699 Aug 26, 2024
d4671e6
Merge pull request #3292 from syncfusion-content/904108-conflict
MaithiliyK Aug 27, 2024
ca808a7
Added the release notes MD file and corresponding node entry in the T…
DeepakRajSundar Sep 2, 2024
603db89
SEO-187689-EJ2-ASP.NET-CORE-document-editor-overview-Page-with-redire…
Faith-Atieno Sep 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ej2-asp-core-mvc/EJ2_ASP.NETCORE/introduction.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
layout: post
title: Introduction of Syncfusion ##Platform_Name## controls
title: Introduction of Syncfusion ##Platform_Name## Controls | Syncfusion
description: Learn here all about introduction of 70+ Syncfusion ##Platform_Name## UI controls powered by Essential JS 2.
platform: ej2-asp-core-mvc
control: Common
Expand All @@ -16,7 +16,7 @@ Essential JS 2 for ASP.NET Core is a modern enterprise UI toolkit that has been

* The best way to get started would be to read the "Getting Started" section of the documentation for the control that you would like to start using first. The "Getting Started" guide gives just enough information that you need to know before starting to write code. This is the only section that is recommended to read end-to-end before starting to write code, all other information can be referred as needed.

* Now that you are familiar with the basics of using the control, the next step would be to start integrating the control into your application. A good starting point would be to refer to the code snippets in the [online sample browser](http://ej2.syncfusion.com/aspnetcore/) which contains hundreds of code samples, it is very likely that you will find a code sample that resembles your intended usage scenario.
* Now that you are familiar with the basics of using the control, the next step would be to start integrating the control into your application. A good starting point would be to refer to the code snippets in the [online sample browser](https://ej2.syncfusion.com/aspnetcore/grid/gridoverview#/fluent2) which contains hundreds of code samples, it is very likely that you will find a code sample that resembles your intended usage scenario.

* Another valuable resource is the API reference which provides detailed information on the object hierarchy as well as the settings available on every object.

Expand Down
16 changes: 16 additions & 0 deletions ej2-asp-core-mvc/Release-notes/26.2.10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Essential Studio for ##Platform_Name## Weekly Release Release Notes
description: Essential Studio for ##Platform_Name## Weekly Release Release Notes
platform: ej2-asp-core-mvc
documentation: ug
---

# Essential Studio for ##Platform_Name## Release Notes

{% include release-info.html date="August 20, 2024" version="v26.2.10" %}

{% directory path: _includes/release-notes/v26.2.10 %}

{% include {{file.url}} %}

{% enddirectory %}
16 changes: 16 additions & 0 deletions ej2-asp-core-mvc/Release-notes/26.2.11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Essential Studio for ##Platform_Name## Weekly Release Release Notes
description: Essential Studio for ##Platform_Name## Weekly Release Release Notes
platform: ej2-asp-core-mvc
documentation: ug
---

# Essential Studio for ##Platform_Name## Release Notes

{% include release-info.html date="August 27, 2024" version="v26.2.11" %}

{% directory path: _includes/release-notes/v26.2.11 %}

{% include {{file.url}} %}

{% enddirectory %}
16 changes: 16 additions & 0 deletions ej2-asp-core-mvc/Release-notes/26.2.12.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Essential Studio for ##Platform_Name## Weekly Release Release Notes
description: Essential Studio for ##Platform_Name## Weekly Release Release Notes
platform: ej2-asp-core-mvc
documentation: ug
---

# Essential Studio for ##Platform_Name## Release Notes

{% include release-info.html date="September 03, 2024" version="v26.2.12" %}

{% directory path: _includes/release-notes/v26.2.12 %}

{% include {{file.url}} %}

{% enddirectory %}
16 changes: 16 additions & 0 deletions ej2-asp-core-mvc/Release-notes/26.2.8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Essential Studio for ##Platform_Name## Weekly Release Release Notes
description: Essential Studio for ##Platform_Name## Weekly Release Release Notes
platform: ej2-asp-core-mvc
documentation: ug
---

# Essential Studio for ##Platform_Name## Release Notes

{% include release-info.html date="August 06, 2024" version="v26.2.8" %}

{% directory path: _includes/release-notes/v26.2.8 %}

{% include {{file.url}} %}

{% enddirectory %}
16 changes: 16 additions & 0 deletions ej2-asp-core-mvc/Release-notes/26.2.9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Essential Studio for ##Platform_Name## Weekly Release Release Notes
description: Essential Studio for ##Platform_Name## Weekly Release Release Notes
platform: ej2-asp-core-mvc
documentation: ug
---

# Essential Studio for ##Platform_Name## Release Notes

{% include release-info.html date="August 13, 2024" version="v26.2.9" %}

{% directory path: _includes/release-notes/v26.2.9 %}

{% include {{file.url}} %}

{% enddirectory %}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
public IActionResult Index()
{
var Order = OrderDetails.GetAllRecords();
ViewBag.DataSource = Order;
ViewBag.dataSource = Order;
return View();
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

<script>
function dataBound() {
var grid = document.getElementById('Auto').ej2_instances[0];
var column = grid.columns[0];
column.isPrimaryKey = 'true';
document.getElementById('Auto').ej2_instances[0].columns[0].isPrimaryKey = 'true';
}
</script>
10 changes: 10 additions & 0 deletions ej2-asp-core-mvc/code-snippet/grid/columns/auto-primary/tagHelper
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<ejs-grid id="Auto" dataSource="@ViewBag.dataSource" dataBound="dataBound">
<e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true">
</e-grid-editSettings>
</ejs-grid>

<script>
function dataBound() {
document.getElementById('Auto').ej2_instances[0].columns[0].isPrimaryKey = 'true';
}
</script>
2 changes: 1 addition & 1 deletion ej2-asp-core-mvc/code-snippet/grid/columns/auto/razor
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@Html.EJS().Grid("Auto").DataSource((IEnumerable<object>)ViewBag.dataSource).Render()
@Html.EJS().Grid("Auto").AllowPaging(true).DataSource((IEnumerable<object>)ViewBag.DataSource).Render()
3 changes: 1 addition & 2 deletions ej2-asp-core-mvc/code-snippet/grid/columns/auto/tagHelper
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<ejs-grid id="Grid" dataSource="@ViewBag.DataSource">

<ejs-grid id="Grid" allowPaging=true dataSource="@ViewBag.DataSource">
</ejs-grid>
22 changes: 12 additions & 10 deletions ej2-asp-core-mvc/code-snippet/grid/columns/autocolumnformat/razor
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
@Html.EJS().Grid("Auto").DataSource((IEnumerable<object>)ViewBag.dataSource).DataBound("dataBound").Render()

@Html.EJS().Grid("Auto").DataSource((IEnumerable<object>)ViewBag.DataSource).DataBound("dataBound").Render()
<script>
function dataBound() {
for (var i = 0; i < this.columns.length; i++) {
this.columns[0].width = 120;
if (this.columns[i].field === "OrderDate") {
this.columns[i].type = "date";
const grid = document.getElementById('Auto').ej2_instances[0];
for (const cols of grid.columns) {
if (cols.field === 'OrderID') {
cols.width = 120;
}
if (this.columns[i].type === "date") {
this.columns[i].format = { type: "date", format: "dd/MM/yyyy" };
if (cols.field === 'OrderDate') {
cols.type = 'date';
cols.format = 'yMd';
}
if (cols.field === 'Freight') {
cols.format = 'P2';
}
this.columns[3].format = "P2";
}
this.refreshColumns();
grid.refreshColumns();
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@

<script>
function dataBound() {
for (var i = 0; i < this.columns.length; i++) {
this.columns[0].width = 120;
if (this.columns[i].field === "OrderDate") {
this.columns[i].type = "date";
const grid = document.getElementById('Auto').ej2_instances[0];
for (const cols of grid.columns) {
if (cols.field === 'OrderID') {
cols.width = 120;
}
if (this.columns[i].type === "date") {
this.columns[i].format = { type: "date", format: "dd/MM/yyyy" };
if (cols.field === 'OrderDate') {
cols.type = 'date';
cols.format = 'yMd';
}
if (cols.field === 'Freight') {
cols.format = 'P2';
}
this.columns[3].format = "P2";
}
this.refreshColumns();
grid.refreshColumns();
}
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public IActionResult Index()
{
var ComplexData = ComplexData.GetAllRecords();
ViewBag.DataSource = ComplexData;
return View();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@{
var valueAccess = "valueAccessFn";
}

@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.DataSource).Height(350).Columns(col =>
{
col.Field("EmployeeID").HeaderText("Employee ID").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add();
col.Field("Name").HeaderText("Full Name").ValueAccessor(valueAccess).Width("150").Add();
col.Field("Title").HeaderText("Title").Width("150").Add();
}).Render()

<script>
function valueAccessFn(field, data) {
return data[field].map((s) => { return s.LastName || s.FirstName; }).join(' ');
}
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@{
var valueAccess = "valueAccessFn";
}

<ejs-grid id="Grid" dataSource="@ViewBag.DataSource" height="350" >
<e-grid-columns>
<e-grid-column field="EmployeeID" headerText="Employee ID" width="150" ></e-grid-column>
<e-grid-column field="Name" headerText="Full Name" width="150"></e-grid-column>
<e-grid-column field="Title" headerText="Title" width="150"></e-grid-column>
</e-grid-columns>
</ejs-grid>

<script>
function valueAccessFn(field, data) {
return data[field].map((s) => { return s.LastName || s.FirstName; }).join(' ');
}
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public IActionResult Index()
{
var Order = FoodDetails.GetAllRecords();
ViewBag.DataSource = Order;
return View();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@{
var totalCalories = "totalCaloriesFn";
}

@Html.EJS().Grid("ValueAccessor").DataSource((IEnumerable<object>)ViewBag.DataSource).Height(350).Columns(col =>
{
col.Field("FoodName").HeaderText("Food Name").Width("150").Add();
col.Field("Protein").HeaderText("Protein").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add();
col.Field("Fat").HeaderText("Fat").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("80").Add();
col.Field("Carbohydrate").HeaderText("Carbohydrate").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add();
col.HeaderText("Calories Intake").ValueAccessor(totalCalories).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("150").Add();

}).Render()

<script>
function totalCaloriesFn(field, data) {
return data.Protein * 4 + data.Fat * 9 + data.Carbohydrate * 4;
}
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@{
var totalCalories = "totalCaloriesFn";
}

<ejs-grid id="ValueAccessor" dataSource="@ViewBag.DataSource" height="280">
<e-grid-columns>
<e-grid-column field='FoodName' headerText='Food Name' width=150></e-grid-column>
<e-grid-column field='Protein' headerText='Protein' textAlign='Right' width=120></e-grid-column>
<e-grid-column field='Fat' headerText='Fat' textAlign='Right' width=80></e-grid-column>
<e-grid-column field='Carbohydrate' headerText='Carbohydrate' textAlign='Right' width=120></e-grid-column>
<e-grid-column headerText='Calories Intake' textAlign='Right' valueAccessor='totalCalories' width=150></e-grid-column>
</e-grid-columns>
</ejs-grid>

<script>
function totalCaloriesFn(field, data) {
return data.Protein * 4 + data.Fat * 9 + data.Carbohydrate * 4;
}
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@Html.EJS().Grid("Grid").DataSource(dataManger =>
{
dataManger.Url("https://services.odata.org/V4/Northwind/Northwind.svc/Orders/").CrossDomain(true).Adaptor("ODataV4Adaptor");

}).Query("new ej.data.Query().expand('Employee')").Columns(col =>
{
col.Field("OrderID").HeaderText("Order ID").Width("100").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add();
col.Field("CustomerID").HeaderText("Customer Name").Width("120").Add();
col.Field("ShipCity").HeaderText("Ship City").Width("130").Add();
col.Field("Employee.City").HeaderText("City").Width("130").Add();

}).AllowPaging().Render()
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<ejs-grid id="Grid" allowPaging='true' query="new ej.data.Query().expand('Employee')" >
<e-data-manager url="https://services.odata.org/V4/Northwind/Northwind.svc/Orders/" crossdomain="true" adaptor="ODataV4Adaptor"></e-data-manager>
<e-grid-columns>
<e-grid-column field="OrderID" headerText="Order ID" width="100" ></e-grid-column>
<e-grid-column field="CustomerID" headerText="Customer ID" width="120"></e-grid-column>
<e-grid-column field="ShipCity" headerText="Ship City" width="130"></e-grid-column>
<e-grid-column field="Employee.City" headerText="City" width="130"></e-grid-column>
</e-grid-columns>
</ejs-grid>

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@Html.EJS().Grid("Grid").DataSource((IEnumerable<object>)ViewBag.dataSource).Height(350).Columns(col =>
{
col.HeaderText("S.No").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Center).Width("90").Add();
col.Field("OrderID").HeaderText("Order ID").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add();
col.Field("CustomerID").HeaderText("Customer Name").Width("150").Add();
col.Field("Freight").HeaderText("Freight").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Width("120").Add();
col.Field("ShipCity").HeaderText("Ship City").Width("150").Add();
}).AllowPaging().RowDataBound("rowDataBound").Render()
</div>
<script>
function rowDataBound(args) {
let grid = document.getElementById('Grid').ej2_instances[0];
if (args.row) {
var rowIndex = parseInt(args.row.getAttribute('aria-rowIndex'));
var currentPageNumber = grid.pageSettings.currentPage;
var pageSize = grid.pageSettings.pageSize;
var startIndex = (currentPageNumber - 1) * pageSize;
args.row.querySelector('.e-rowcell').innerHTML = (
startIndex + rowIndex
).toString();
}
}
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public IActionResult Index()
{
var Order = OrdersDetails.GetAllRecords();
ViewBag.dataSource = Order;
return View();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<ejs-grid id="Grid" dataSource="@ViewBag.dataSource" height="350" rowDataBound='rowDataBound' allowPaging="true">
<e-grid-columns>
<e-grid-column headerText='S.No' width=90 textAlign='Center'></e-grid-column>
<e-grid-column field="OrderID" headerText="Order ID" width="100" textAlign="Right"></e-grid-column>
<e-grid-column field="CustomerID" headerText="Customer Name" width="120"></e-grid-column>
<e-grid-column field="Freight" headerText="Freight" textAlign="Right" width="120" ></e-grid-column>
<e-grid-column field="ShipCity" headerText="Ship City" width="150"></e-grid-column>
</e-grid-columns>
</ejs-grid>
<script>
function rowDataBound (args) {
let grid = document.getElementById('Grid').ej2_instances[0];
if (args.row) {
var rowIndex = parseInt(args.row.getAttribute('aria-rowIndex'));
var currentPageNumber = grid.pageSettings.currentPage;
var pageSize = grid.pageSettings.pageSize;
var startIndex = (currentPageNumber - 1) * pageSize;
args.row.querySelector('.e-rowcell').innerHTML = (
startIndex + rowIndex
).toString();
}
}
</script>
Loading