diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/auto-generated-columns.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/auto-generated-columns.md deleted file mode 100644 index 03d3797628..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/auto-generated-columns.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -layout: post -title: Auto Generated Columns in ##Platform_Name## Grid Component -description: Learn here all about Auto Generated Columns in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Auto Generated Columns -publishingplatform: ##Platform_Name## -documentation: ug ---- - -# Auto Generated Columns - -The [`Columns`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html) are automatically generated when [`Columns`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html) declaration is empty or undefined while initializing the grid. All the columns in the [`DataSource`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataSource) are bound as grid columns. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/auto/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Auto.cs" %} -{% include code-snippet/grid/columns/auto/auto.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/auto/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Auto.cs" %} -{% include code-snippet/grid/columns/auto/auto.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - - -N> When columns are auto-generated, the column [`Type`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Type) will be determined from the first record of the [`DataSource`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataSource). - -## Set Primary key column for auto generated columns when editing is enabled - -Primary key can be defined in the declaration of column object of the grid. When you did not declare the columns, the grid will generate the columns automatically. For these auto generated columns, you can set [`IsPrimaryKey`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_IsPrimaryKey) column property as true by using the following ways, - -If Primary key "column index" is known then refer the following example - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/primary/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Primary.cs" %} -{% include code-snippet/grid/columns/primary/primary.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/primary/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Primary.cs" %} -{% include code-snippet/grid/columns/primary/primary.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - - -N> If Primary key "column fieldname" is known then you can get the column by using **var column = grid.getColumnByField('OrderID')** and then set primary key by defining **Column.IsPrimaryKey = 'true'** - -## Set column options to auto generated columns - -You can set column options such as [`Format`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Format), [`Width`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Width) to the auto generated columns by using [`DataBound`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataBound) event of the grid. - -In the below example, [`Width`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Width) is set for **OrderID** column, date type is set for **OrderDate** column and numeric type is set for **Freight** column. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/autocolumnformat/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Autocolumnformat.cs" %} -{% include code-snippet/grid/columns/autocolumnformat/autocolumnformat.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/autocolumnformat/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Autocolumnformat.cs" %} -{% include code-snippet/grid/columns/autocolumnformat/autocolumnformat.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/columns.md b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/columns.md index f3109a11cd..316f2b5d02 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/columns.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.MVC/columns/columns.md @@ -33,34 +33,6 @@ Grid column supports the following types: N> If the [`Type`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Type) is not defined, it will be determined from the first record of the [`DataSource`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataSource).
Incase if the first record of the [`DataSource`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataSource) is null/blank value for a column then it is necessary to define the [`Type`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Type) for that column. -## ValueAccessor - -The **valueAccessor** is used to access/manipulate the value of display data. You can achieve custom value formatting by using the valueAccessor. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/valueaccessor/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Valueaccessor.cs" %} -{% include code-snippet/grid/columns/valueaccessor/valueaccessor.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/valueaccessor/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Valueaccessor.cs" %} -{% include code-snippet/grid/columns/valueaccessor/valueaccessor.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - ## Format diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/columns/auto-generated-columns.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/columns/auto-generated-columns.md deleted file mode 100644 index 903ecbce61..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/columns/auto-generated-columns.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -layout: post -title: Auto Generated Columns in ##Platform_Name## Grid Control | Syncfusion -description: Learn here all about Auto Generated Columns in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Auto Generated Columns -publishingplatform: ##Platform_Name## -documentation: ug ---- - -# Auto Generated Columns - -The [`Columns`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Columns) are automatically generated when [`Columns`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_Columns) declaration is empty or undefined while initializing the grid. All the columns in the **DataSource** are bound as grid columns. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/auto/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Auto.cs" %} -{% include code-snippet/grid/columns/auto/auto.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/auto/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Auto.cs" %} -{% include code-snippet/grid/columns/auto/auto.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - - -N> When columns are auto-generated, the column [`Type`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Type) will be determined from the first record of the **DataSource**. - -## Set Primary key column for auto generated columns when editing is enabled - -Primary key can be defined in the declaration of column object of the grid. If you did not declare the columns, the grid will generate the columns automatically. For these auto generated columns, you can set [`isPrimaryKey`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_IsPrimaryKey) property of **e-grid-column** as true by using the following ways, - -If Primary key "column index" is known then refer the following example - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/primary/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Primary.cs" %} -{% include code-snippet/grid/columns/primary/primary.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/primary/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Primary.cs" %} -{% include code-snippet/grid/columns/primary/primary.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - - -N> If Primary key "column fieldname" is known then you can get the column by using `var column = grid.getColumnByField('OrderID')` and then set primary key by defining [`isPrimaryKey`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_IsPrimaryKey) property as true in **e-grid-column** tag helper. - -## Set column options to auto generated columns - -You can set column options such as [`format`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Format), [`width`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Width) to the auto generated columns by using [`dataBound`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.Grid.html#Syncfusion_EJ2_Grids_Grid_DataBound) event of the grid. - -In the below example, [`width`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Width) is set for **OrderID** column, **date** type is set for **OrderDate** column and **numeric** type is set for **Freight** column. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/autocolumnformat/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Autocolumnformat.cs" %} -{% include code-snippet/grid/columns/autocolumnformat/autocolumnformat.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/autocolumnformat/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Autocolumnformat.cs" %} -{% include code-snippet/grid/columns/autocolumnformat/autocolumnformat.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/columns/columns.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/columns/columns.md index 57851e0be8..8bbee1b14c 100644 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/columns/columns.md +++ b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/columns/columns.md @@ -32,35 +32,6 @@ Grid column supports the following types: N> If the [`type`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Type) is not defined, it will be determined from the first record of the **DataSource**.
Incase if the first record of the **DataSource** is null/blank value for a column then it is necessary to define the [`type`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Type) for that column. -## ValueAccessor - -The **valueAccessor** is used to access/manipulate the value of display data. You can achieve custom value formatting by using the valueAccessor. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/valueaccessor/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Valueaccessor.cs" %} -{% include code-snippet/grid/columns/valueaccessor/valueaccessor.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/columns/valueaccessor/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Valueaccessor.cs" %} -{% include code-snippet/grid/columns/valueaccessor/valueaccessor.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - - - ## Format To format cell values based on specific culture, use the [`format`](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Grids.GridColumn.html#Syncfusion_EJ2_Grids_GridColumn_Format) property of **e-grid-column** tag helper . The grid uses **Internalization** library to format **number** and **date** values. diff --git a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/customize-the-icon-for-column-menu.md b/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/customize-the-icon-for-column-menu.md deleted file mode 100644 index cfd21a6098..0000000000 --- a/ej2-asp-core-mvc/grid/EJ2_ASP.NETCORE/how-to/customize-the-icon-for-column-menu.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -layout: post -title: Customize The Icon For Column Menu in ##Platform_Name## Grid Component -description: Learn here all about Customize The Icon For Column Menu in Syncfusion ##Platform_Name## Grid component of Syncfusion Essential JS 2 and more. -platform: ej2-asp-core-mvc -control: Customize The Icon For Column Menu -publishingplatform: ##Platform_Name## -documentation: ug ---- - - -# Customize the icon for column menu - -You can customize the column menu icon by overriding the default grid class **.e-icons.e-columnmenu** with a custom property **content** as mentioned below, - -```css - -.e-grid .e-columnheader .e-icons.e-columnmenu::before { - content: "\e969"; -} - -``` - -In the below sample, grid is rendered with a customized column menu icon. - -{% if page.publishingplatform == "aspnet-core" %} - -{% tabs %} -{% highlight cshtml tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/custom-column-menu-icon/tagHelper %} -{% endhighlight %} -{% highlight c# tabtitle="Column-icon.cs" %} -{% include code-snippet/grid/how-to/custom-column-menu-icon/column-icon.cs %} -{% endhighlight %} -{% endtabs %} - -{% elsif page.publishingplatform == "aspnet-mvc" %} - -{% tabs %} -{% highlight razor tabtitle="CSHTML" %} -{% include code-snippet/grid/how-to/custom-column-menu-icon/razor %} -{% endhighlight %} -{% highlight c# tabtitle="Column-icon.cs" %} -{% include code-snippet/grid/how-to/custom-column-menu-icon/column-icon.cs %} -{% endhighlight %} -{% endtabs %} -{% endif %} - -