diff --git a/ej2-asp-core-mvc/document-editor/images/Column_Limit_Alert.png b/ej2-asp-core-mvc/document-editor/images/Column_Limit_Alert.png new file mode 100644 index 0000000000..01d15c9afa Binary files /dev/null and b/ej2-asp-core-mvc/document-editor/images/Column_Limit_Alert.png differ diff --git a/ej2-asp-core-mvc/document-editor/images/Row_Limit_Alert.png b/ej2-asp-core-mvc/document-editor/images/Row_Limit_Alert.png new file mode 100644 index 0000000000..147f9050a4 Binary files /dev/null and b/ej2-asp-core-mvc/document-editor/images/Row_Limit_Alert.png differ diff --git a/ej2-asp-core-mvc/document-editor/table.md b/ej2-asp-core-mvc/document-editor/table.md index eddaba6109..68811c5762 100644 --- a/ej2-asp-core-mvc/document-editor/table.md +++ b/ej2-asp-core-mvc/document-editor/table.md @@ -1,6 +1,6 @@ --- layout: post -title: Table in ##Platform_Name## Document Editor Component +title: Table in ##Platform_Name## Document Editor Component | Syncfusion description: Learn here all about table in Syncfusion ##Platform_Name## Document Editor component of Syncfusion Essential JS 2 and more. platform: ej2-asp-core-mvc control: Table @@ -21,7 +21,109 @@ You can create and insert a table at cursor position by specifying the required documenteditor.editor.insertTable(3,3); ``` -The maximum size of row and column is limited to 32767 and 63 respectively. +## Set the maximum number of Rows when inserting a table + +{% if page.publishingplatform == "aspnet-core" %} + +You can use the `maximumRows` property to set the maximum number of rows allowed while inserting a table in the Document Editor component. + +Refer to the following sample code. + +```ts + + + +``` + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +You can use the `maximumRows` property to set the maximum number of rows allowed while inserting a table in the Document Editor component. + +```ts +
+@Html.EJS().DocumentEditorContainer("container").Created("onCreated").EnableToolbar(true).Render() +
+ +``` + +{% endif %} + +When the maximum row limit is reached, an alert will appear, as follow + +![Row Limit Alert](images/Row_Limit_Alert.PNG) + +>Note: The maximum value of Row is 32767, as per Microsoft Word application and you can set any value less than or equal to 32767 to this property. + +## Set the maximum number of Columns when inserting a table + +{% if page.publishingplatform == "aspnet-core" %} + +You can use the `maximumColumns` property to set the maximum number of columns allowed while inserting a table in the Document Editor component. + +Refer to the following sample code. + +```ts + + + +``` + +{% elsif page.publishingplatform == "aspnet-mvc" %} + +You can use the `maximumColumns` property to set the maximum number of columns allowed while inserting a table in the Document Editor component. + +Refer to the following sample code. + +```ts +
+@Html.EJS().DocumentEditorContainer("container").Created("onCreated").EnableToolbar(true).Render() +
+ +``` + +{% endif %} + +When the maximum column limit is reached, an alert will appear, as follow + +![Column Limit Alert](images/Column_Limit_Alert.PNG) + +>Note: The maximum value of Column is 63, as per Microsoft Word application and you can set any value less than or equal to 63 to this property. ## Insert rows @@ -145,7 +247,9 @@ The following sample demonstrates how to delete the table row or columns, merge {% include code-snippet/document-editor/table/tagHelper %} {% endhighlight %} {% highlight c# tabtitle="Table.cs" %} -{% endhighlight %}{% endtabs %} +{% include code-snippet/document-editor/table/document-editor.cs %} +{% endhighlight %} +{% endtabs %} {% elsif page.publishingplatform == "aspnet-mvc" %} @@ -154,7 +258,9 @@ The following sample demonstrates how to delete the table row or columns, merge {% include code-snippet/document-editor/table/razor %} {% endhighlight %} {% highlight c# tabtitle="Table.cs" %} -{% endhighlight %}{% endtabs %} +{% include code-snippet/document-editor/table/document-editor.cs %} +{% endhighlight %} +{% endtabs %} {% endif %} @@ -162,4 +268,4 @@ The following sample demonstrates how to delete the table row or columns, merge ## See Also * [Feature modules](../document-editor/feature-module/) -* [Insert table dialog](../document-editor/dialog/#table-dialog) \ No newline at end of file +* [Insert table dialog](../document-editor/dialog/#table-dialog)