Skip to content

Commit d1472db

Browse files
Merge pull request #3179 from Syncfusion-Content/hotfix/hotfix-v26.1.35
DOCINFRA-2341_merged_using_automation
2 parents 1d321fc + c591324 commit d1472db

File tree

41 files changed

+577
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+577
-27
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Essential Studio for ##Platform_Name## Weekly Release Release Notes
3+
description: Essential Studio for ##Platform_Name## Weekly Release Release Notes
4+
platform: ej2-asp-core-mvc
5+
documentation: ug
6+
---
7+
8+
# Essential Studio for ##Platform_Name## Release Notes
9+
10+
{% include release-info.html date="July 09, 2024" version="v26.1.41" %}
11+
12+
{% directory path: _includes/release-notes/v26.1.41 %}
13+
14+
{% include {{file.url}} %}
15+
16+
{% enddirectory %}

ej2-asp-core-mvc/auto-complete/virtual-scroll.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,35 @@ public class BindingRecord
105105
{% endtabs %}
106106
{% endif %}
107107

108+
## Customizing items count in virtualization
109+
110+
When the `enableVirtualization` property is enabled, the `take` property provided by the user within the Query parameter at the initial state or during the `actionBegin` event will be considered. Internally, it calculates the items that fit onto the current page (i.e., probably twice the amount of the popup's height). If the user-provided take value is less than the minimum number of items that fit into the popup, the user-provided take value will not be considered.
111+
112+
The following sample shows the example for Customizing items count in virtualization.
113+
114+
{% if page.publishingplatform == "aspnet-core" %}
115+
116+
{% tabs %}
117+
{% highlight cshtml tabtitle="CSHTML" %}
118+
{% include code-snippet/autocomplete/virtual-scroll-items/tagHelper %}
119+
{% endhighlight %}
120+
{% highlight c# tabtitle="virtualscroll.cs" %}
121+
{% include code-snippet/autocomplete/virtual-scroll-items/virtualscroll.cs %}
122+
{% endhighlight %}
123+
{% endtabs %}
124+
125+
{% elsif page.publishingplatform == "aspnet-mvc" %}
126+
127+
{% tabs %}
128+
{% highlight razor tabtitle="CSHTML" %}
129+
{% include code-snippet/autocomplete/virtual-scroll-items/razor %}
130+
{% endhighlight %}
131+
{% highlight c# tabtitle="virtualscroll.cs" %}
132+
{% include code-snippet/autocomplete/virtual-scroll-items/virtualscroll.cs %}
133+
{% endhighlight %}
134+
{% endtabs %}
135+
{% endif %}
136+
108137
## Grouping
109138

110139
The AutoComplete component supports grouping with Virtualization. It allows you to organize elements into groups based on different categories. Each item in the list can be classified using the [groupBy](https://help.syncfusion.com/cr/cref_files/aspnetcore-js2/Syncfusion.EJ2~Syncfusion.EJ2.DropDowns.AutoCompleteFieldSettings~GroupBy.html) field in the data table. After grouping, virtualization works similarly to local data binding, providing a seamless user experience. When the data source is bound to remote data, an initial request is made to retrieve all data for the purpose of grouping. Subsequently, the grouped data works in the same way as local data binding virtualization, enhancing performance and responsiveness.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@Html.EJS().AutoComplete("records").Placeholder("Select a item").PopupHeight("200px").DataSource((IEnumerable<object>)ViewBag.data).EnableVirtualization(true).Fields(new Syncfusion.EJ2.DropDowns.AutoCompleteFieldSettings { Value = "Text" }).ActionBegin("onbegin").Query("new ej.data.Query().take(40)").Render()
2+
3+
<script>
4+
function onbegin(e) {
5+
e.query = new ej.data.Query().take(45);
6+
}
7+
</script>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
6+
namespace WebApplication1.Models
7+
{
8+
public class Record
9+
{
10+
public string ID { get; set; }
11+
public string Text { get; set; }
12+
public List<Record> RecordList { set; get; }
13+
public List<Record> RecordModelList()
14+
{
15+
return Enumerable.Range(1, 150).Select(i => new Record()
16+
{
17+
ID = i.ToString(),
18+
Text = "Item " + i,
19+
}).ToList();
20+
}
21+
}
22+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="control-wrapper">
2+
<div id="default" style='padding-top:75px;'>
3+
<ejs-autocomplete id="records" dataSource="@ViewBag.data" query="new ej.data.Query().take(40)" actionBegin="onbegin" placeholder="Select a item" allowFiltering="false" enableVirtualization="true" popupHeight="200px">
4+
<e-autocomplete-fields value="Text"></e-autocomplete-fields>
5+
</ejs-autocomplete>
6+
</div>
7+
</div>
8+
9+
<script>
10+
function onbegin(e) {
11+
e.query = new ej.data.Query().take(45);
12+
}
13+
</script>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
using WebApplication1.Models;
7+
8+
namespace WebApplication1.Controllers
9+
{
10+
public class MultiSelectController : Controller
11+
{
12+
public ActionResult virtualscroll()
13+
{
14+
ViewBag.data = new Record().RecordModelList();
15+
return View();
16+
}
17+
}
18+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@Html.EJS().ComboBox("records").Placeholder("Select a item").PopupHeight("200px").DataSource((IEnumerable<object>)ViewBag.data).EnableVirtualization(true).AllowFiltering(false).Fields(new Syncfusion.EJ2.DropDowns.ComboBoxFieldSettings { Value = "ID", Text="Text" }).ActionBegin("onbegin").Query("new ej.data.Query().take(40)").Render()
2+
3+
<script>
4+
function onbegin(e) {
5+
e.query = new ej.data.Query().take(45);
6+
}
7+
</script>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
6+
namespace WebApplication1.Models
7+
{
8+
public class Record
9+
{
10+
public string ID { get; set; }
11+
public string Text { get; set; }
12+
public List<Record> RecordList { set; get; }
13+
public List<Record> RecordModelList()
14+
{
15+
return Enumerable.Range(1, 150).Select(i => new Record()
16+
{
17+
ID = i.ToString(),
18+
Text = "Item " + i,
19+
}).ToList();
20+
}
21+
}
22+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="control-wrapper">
2+
<div id="default" style='padding-top:75px;'>
3+
<ejs-combobox id="records" dataSource="@ViewBag.data" query="new ej.data.Query().take(40)" actionBegin="onbegin" placeholder="Select a item" allowFiltering="false" enableVirtualization="true" popupHeight="200px">
4+
<e-combobox-fields value="ID" text="Text"></e-combobox-fields>
5+
</ejs-combobox>
6+
</div>
7+
</div>
8+
9+
<script>
10+
function onbegin(e) {
11+
e.query = new ej.data.Query().take(45);
12+
}
13+
</script>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
using WebApplication1.Models;
7+
8+
namespace WebApplication1.Controllers
9+
{
10+
public class MultiSelectController : Controller
11+
{
12+
public ActionResult virtualscroll()
13+
{
14+
ViewBag.data = new Record().RecordModelList();
15+
return View();
16+
}
17+
}
18+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public ActionResult Default()
2+
{
3+
return View();
4+
}
5+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<div id="documenteditor" style="width:100%;height:100%">
2+
@Html.EJS().DocumentEditorContainer("container").Created("onDocCreate").EnableToolbar(true).Render()
3+
</div>
4+
5+
<script>
6+
function onDocCreate() {
7+
var container = document.getElementById("container").ej2_instances[0];
8+
var toolItem = {
9+
prefixIcon: "e-save icon",
10+
tooltipText: "Save the Document",
11+
text: "Save",
12+
id: "save"
13+
};
14+
container.toolbarItems = ['New','Open',toolItem, 'Separator' ,'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl'];
15+
container.toolbarClick = function (args) {
16+
switch (args.item.id) {
17+
case 'save':
18+
container.documentEditor.save('sample','Docx');
19+
break;
20+
}
21+
};
22+
}
23+
</script>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<ejs-documenteditorcontainer id="container" created="onDocCreate"></ejs-documenteditorcontainer>
2+
<script>
3+
function onDocCreate() {
4+
var container = document.getElementById("container").ej2_instances[0];
5+
var toolItem = {
6+
prefixIcon: "e-de-ctnr-lock",
7+
tooltipText: "Disable Image",
8+
text: "Disable Image",
9+
id: "Custom"
10+
};
11+
container.toolbarItems = ['New','Open',toolItem, 'Separator' ,'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'Comments', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'Separator', 'Find', 'Separator', 'LocalClipboard', 'RestrictEditing'];
12+
container.toolbarClick = function (args) {
13+
switch (args.item.id) {
14+
case 'Custom':
15+
container.documentEditor.save('Sample', 'Docx');
16+
break;
17+
}
18+
};
19+
}
20+
</script>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
2+
@Html.EJS().DocumentEditorContainer("container").Created("onCreate").EnableToolbar(true).Render()
3+
4+
5+
<script>
6+
var container;
7+
var containerPanel;
8+
var contentChanged =false;
9+
document.addEventListener('DOMContentLoaded', function () {
10+
var documenteditorElement = document.getElementById("container");
11+
container = documenteditorElement.ej2_instances[0];
12+
container.contentChange=function(){
13+
contentChanged = true;
14+
}
15+
});
16+
function onCreate() {
17+
var documenteditorElement = document.getElementById("container");
18+
container = documenteditorElement.ej2_instances[0];
19+
setInterval(() => {
20+
if (contentChanged) {
21+
//You can save the document as below
22+
container.documentEditor.saveAsBlob('Docx').then((blob) => {
23+
console.log('Saved sucessfully');
24+
let exportedDocument = blob;
25+
//Now, save the document where ever you want.
26+
let formData = new FormData();
27+
formData.append('fileName', 'sample.docx');
28+
formData.append('data', exportedDocument);
29+
/* tslint:disable */
30+
var req = new XMLHttpRequest();
31+
// Replace your running Url here
32+
req.open(
33+
'POST',
34+
'http://localhost:62869/api/documenteditor/AutoSave',
35+
true
36+
);
37+
req.onreadystatechange = () => {
38+
if (req.readyState === 4) {
39+
if (req.status === 200 || req.status === 304) {
40+
console.log('Saved sucessfully');
41+
}
42+
}
43+
};
44+
req.send(formData);
45+
});
46+
contentChanged = false;
47+
}
48+
}, 1000);
49+
}
50+
51+
</script>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<ejs-documenteditorcontainer id="container" enableToolbar=true height="590px"></ejs-documenteditorcontainer>
2+
3+
<script>
4+
var container;
5+
var containerPanel;
6+
var contentChanged =false;
7+
document.addEventListener('DOMContentLoaded', function () {
8+
var documenteditorElement = document.getElementById("container");
9+
container = documenteditorElement.ej2_instances[0];
10+
container.contentChange=function(){
11+
contentChanged = true;
12+
}
13+
});
14+
function onCreate() {
15+
var documenteditorElement = document.getElementById("container");
16+
container = documenteditorElement.ej2_instances[0];
17+
setInterval(() => {
18+
if (contentChanged) {
19+
//You can save the document as below
20+
container.documentEditor.saveAsBlob('Docx').then((blob) => {
21+
console.log('Saved sucessfully');
22+
let exportedDocument = blob;
23+
//Now, save the document where ever you want.
24+
let formData = new FormData();
25+
formData.append('fileName', 'sample.docx');
26+
formData.append('data', exportedDocument);
27+
/* tslint:disable */
28+
var req = new XMLHttpRequest();
29+
// Replace your running Url here
30+
req.open(
31+
'POST',
32+
'http://localhost:62869/api/documenteditor/AutoSave',
33+
true
34+
);
35+
req.onreadystatechange = () => {
36+
if (req.readyState === 4) {
37+
if (req.status === 200 || req.status === 304) {
38+
console.log('Saved sucessfully');
39+
}
40+
}
41+
};
42+
req.send(formData);
43+
});
44+
contentChanged = false;
45+
}
46+
}, 1000);
47+
}
48+
49+
</script>

ej2-asp-core-mvc/code-snippet/document-editor/custom-toolbar/razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
text: "Disable Image",
1212
id: "Custom"
1313
};
14-
container.toolbarItems = [toolItem, 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'Comments', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'Separator', 'Find', 'Separator', 'LocalClipboard', 'RestrictEditing'];
14+
container.toolbarItems = [toolItem, 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl'];
1515
container.toolbarClick = function (args) {
1616
switch (args.item.id) {
1717
case 'Custom':

ej2-asp-core-mvc/code-snippet/document-editor/custom-toolbar/tagHelper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
text: "Disable Image",
99
id: "Custom"
1010
};
11-
container.toolbarItems = [toolItem, 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'Comments', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'Separator', 'Find', 'Separator', 'LocalClipboard', 'RestrictEditing'];
11+
container.toolbarItems = [toolItem, 'Undo', 'Redo', 'Separator', 'Image', 'Table', 'Hyperlink', 'Bookmark', 'TableOfContents', 'Separator', 'Header', 'Footer', 'PageSetup', 'PageNumber', 'Break', 'InsertFootnote', 'InsertEndnote', 'Separator', 'Find', 'Separator', 'Comments', 'TrackChanges', 'Separator', 'LocalClipboard', 'RestrictEditing', 'Separator', 'FormFields', 'UpdateFields','ContentControl'];
1212
container.toolbarClick = function (args) {
1313
switch (args.item.id) {
1414
case 'Custom':
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@Html.EJS().DropDownList("records").Placeholder("Select a item").PopupHeight("200px").DataSource((IEnumerable<object>)ViewBag.data).EnableVirtualization(true).AllowFiltering(false).Fields(new Syncfusion.EJ2.DropDowns.DropDownListFieldSettings { Value = "ID", Text="Text" }).ActionBegin("onbegin").Query("new ej.data.Query().take(40)").Render()
2+
3+
<script>
4+
function onbegin(e) {
5+
e.query = new ej.data.Query().take(45);
6+
}
7+
</script>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
6+
namespace WebApplication1.Models
7+
{
8+
public class Record
9+
{
10+
public string ID { get; set; }
11+
public string Text { get; set; }
12+
public List<Record> RecordList { set; get; }
13+
public List<Record> RecordModelList()
14+
{
15+
return Enumerable.Range(1, 150).Select(i => new Record()
16+
{
17+
ID = i.ToString(),
18+
Text = "Item " + i,
19+
}).ToList();
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)