Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions MAUI/DataGrid/addNew-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ documentation: UG
keywords : maui datagrid, maui grid, grid maui, maui gridview, grid in maui, .net maui datagrid, .net maui grid, .net grid maui, .net maui addnewrow, maui add new row
---

# AddNewRow in MAUI DataGrid (SfDataGrid)
# Add New Row in MAUI DataGrid (SfDataGrid)

DataGrid provides built-in row (called AddNewRow) that allows user to add new records to underlying collection. Built-in add new row can be enabled or disabled by setting [SfDataGrid.AddNewRowPosition](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_AddNewRowPosition) property. AddNewRowPosition also denotes the position of add new row in DataGrid.

Expand Down Expand Up @@ -54,7 +54,7 @@ public partial class MainPage : ContentPage
{% endhighlight %}
{% endtabs %}

<img alt="addnewRowpositon-top" src="Images\addnewrow\maui-dataGrid-AddNewRowPosition-top.png" width="604"/>
<img alt="addnewRowpositon-top" src="Images\addnewrow\maui-dataGrid-AddNewRowPosition-top.png" width="404"/>

## Changing the AddNewRow position

Expand Down Expand Up @@ -89,7 +89,7 @@ public partial class MainPage : ContentPage
{% endhighlight %}
{% endtabs %}

<img alt="addnewRowpositon-bottom" src="Images\addnewrow\maui-dataGrid-AddNewRowPosition-bottom.png" width="604"/>
<img alt="addnewRowpositon-bottom" src="Images\addnewrow\maui-dataGrid-AddNewRowPosition-bottom.png" width="404"/>

## Customize the newly added row position

Expand Down Expand Up @@ -154,7 +154,7 @@ public partial class MainPage : ContentPage
{% endhighlight %}
{% endtabs %}

<img alt="addnewRow-text" src="Images\addnewrow\maui-dataGrid-AddNewRowText.png" width="604"/>
<img alt="addnewRow-text" src="Images\addnewrow\maui-dataGrid-AddNewRowText.png" width="404"/>

## Initializing default values for AddNewRow

Expand Down Expand Up @@ -185,7 +185,7 @@ private void dataGrid_AddNewRowInitiating(object? sender, DataGridAddNewRowIniti
{% endhighlight %}
{% endtabs %}

<img alt="addnewRow-DefaultValue" src="Images\addnewrow\maui-dataGrid-DefaultValues.png" width="604"/>
<img alt="addnewRow-DefaultValue" src="Images\addnewrow\maui-dataGrid-DefaultValues.png" width="404"/>

## Working with complex properties in AddNewRow

Expand Down Expand Up @@ -286,9 +286,9 @@ SfDataGrid enables you to customize the watermark text of AddNewRow by changing

To customize the AddNewRowText, add the default Syncfusion.SfDataGrid.WPF.resx file in Resources folder and then customize the value of AddNewRowText. Refer [here](https://help.syncfusion.com/maui/datagrid/localization) to learn more about localization.

<img alt="addnewRow-resxfile" src="Images\addnewrow\maui-dataGrid-AddNewRow_resxfile.png" width="604"/>
<img alt="addnewRow-resxfile" src="Images\addnewrow\maui-dataGrid-AddNewRow_resxfile.png" width="404"/>

<img alt="addnewRow-Localization" src="Images\addnewrow\maui-dataGrid-AddNewRow_Localization.png" width="604"/>
<img alt="addnewRow-Localization" src="Images\addnewrow\maui-dataGrid-AddNewRow_Localization.png" width="404"/>

## Customizing AddNewRow

Expand Down Expand Up @@ -340,7 +340,7 @@ You can customize the AddNewRow's Background, TextColor, FontAttribute, FontFami
{% endhighlight %}
{% endtabs %}

<img alt="addnewRow-ImplicitStyle" src="Images\addnewrow\maui-dataGrid-AddNewRow_ImplicitStyle.png" width="604"/>
<img alt="addnewRow-ImplicitStyle" src="Images\addnewrow\maui-dataGrid-AddNewRow_ImplicitStyle.png" width="404"/>

## AddNewRow support in Master-Details View

Expand Down Expand Up @@ -436,7 +436,7 @@ private void DataGrid_AddNewRowInitiating(object? sender, DataGridAddNewRowIniti
{% endhighlight %}
{% endtabs %}

<img alt="addnewRow-MasterdetailsView" src="Images\addnewrow\maui-dataGrid-AddNewRow_MasterDetailsView.png" width="604"/>
<img alt="addnewRow-MasterdetailsView" src="Images\addnewrow\maui-dataGrid-AddNewRow_MasterDetailsView.png" width="404"/>

### Changing the AddNewRow default text in details view grid

Expand Down Expand Up @@ -491,4 +491,4 @@ this.firstLevelNestedGrid.AddNewRowText = "Click here to add new row in child gr
{% endhighlight %}
{% endtabs %}

<img alt="addnewRow-MasterdetailsView-childtext" src="Images\addnewrow\maui-dataGrid-AddNewRow_ChildText.png" width="604"/>
<img alt="addnewRow-MasterdetailsView-childtext" src="Images\addnewrow\maui-dataGrid-AddNewRow_ChildText.png" width="404"/>
2 changes: 1 addition & 1 deletion MAUI/DataGrid/scrolling.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ The `ScrollingMode` has certain limitations that should be considered:

- Switching between modes at runtime is not supported.
- The `DataGridScrollingMode.Line` does not support master details view.
- The `DataGridScrollingMode.Line` will not be worked as expected when row height is customized through [SfDatagrid.QueryRowHeight](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_QueryRowHeight) event and width is customized through [SfDatagrid.ColumnWidthMode](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_ColumnWidthMode) property.
- The `DataGridScrollingMode.Line` will not be worked as expected when row height is customized through [SfDataGrid.QueryRowHeight](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_QueryRowHeight) event and width is customized through [SfDataGrid.ColumnWidthMode](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_ColumnWidthMode) property.

## Diagonal scrolling

Expand Down
33 changes: 12 additions & 21 deletions MAUI/DataGrid/summaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,9 @@ public class GroupCaptionConverter : IValueConverter

### Displaying column summary with title

SfDataGrid supports displaying both column summaries and title summaries simultaneously. You can show column summary along with title by defining the [DataGridSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) and DataGridSummaryRow.TitleColumnCount property, along with defining summary columns. Showing column summary along with title can be only supported if [DataGridSummaryRow.ShowSummaryInRow](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_ShowSummaryInRow) is disabled.
SfDataGrid supports displaying both column summaries and title summaries simultaneously. You can show column summary along with title by defining the [DataGridSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) and [DataGridSummaryRow.TitleColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_TitleColumnCount) property, along with defining summary columns. Showing column summary along with title can be only supported if [DataGridSummaryRow.ShowSummaryInRow](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_ShowSummaryInRow) is disabled.

In the code snippet below, DataGridSummaryRow.TitleColumnCount is set as 2, and [DataGridSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) is defined along with summary columns.
In the code snippet below, [DataGridSummaryRow.TitleColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_TitleColumnCount) is set as 2, and [DataGridSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) is defined along with summary columns.

{% tabs %}
{% highlight xaml %}
Expand Down Expand Up @@ -418,9 +418,6 @@ In the code snippet below, DataGridSummaryRow.TitleColumnCount is set as 2, and
</dataGrid:SfDataGrid>

{% endhighlight %}
{% endtabs %}

{% tabs %}
{% highlight c# %}

GridSummaryRow captionSummaryRow = new GridSummaryRow()
Expand Down Expand Up @@ -455,11 +452,11 @@ The following screenshot illustrates displaying summary columns with title at sa

![DataGrid with caption summary column and title](Images\caption-summary\maui-datagrid-caption-column-summary-title.png)

### Limitations
#### Limitations

The following are the limitations of displaying column summary along with title at same time for DataGridSummaryRow:

* If FrozenColumnCount is defined as less than DataGridSummaryRow.TitleColumnCount, the title summary will span the range of FrozenColumnCount, since the spanned range and frozen range cannot vary.
* If [FrozenColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_FrozenColumnCount) is defined as less than [DataGridSummaryRow.TitleColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_TitleColumnCount), the title summary will span the range of [FrozenColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_FrozenColumnCount), since the spanned range and frozen range cannot vary.

## Group summary

Expand Down Expand Up @@ -756,9 +753,9 @@ public class GroupSummaryConverter : IValueConverter

### Displaying column summary with title

SfDataGrid supports displaying both column summaries and title summaries simultaneously. You can show column summary along with title by defining the [DataGridSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) and DataGridSummaryRow.TitleColumnCount property, along with defining summary columns. Showing column summary along with title can be only supported if [DataGridSummaryRow.ShowSummaryInRow](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_ShowSummaryInRow) is disabled.
SfDataGrid supports displaying both column summaries and title summaries simultaneously. You can show column summary along with title by defining the [DataGridSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) and [DataGridSummaryRow.TitleColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_TitleColumnCount) property, along with defining summary columns. Showing column summary along with title can be only supported if [DataGridSummaryRow.ShowSummaryInRow](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_ShowSummaryInRow) is disabled.

In the code snippet below, DataGridSummaryRow.TitleColumnCount is set as 2, and [DataGridSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) is defined along with summary columns.
In the code snippet below, [DataGridSummaryRow.TitleColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_TitleColumnCount) is set as 2, and [DataGridSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) is defined along with summary columns.

{% tabs %}
{% highlight xaml %}
Expand Down Expand Up @@ -797,9 +794,6 @@ In the code snippet below, DataGridSummaryRow.TitleColumnCount is set as 2, and

</dataGrid:SfDataGrid>
{% endhighlight %}
{% endtabs %}

{% tabs %}
{% highlight c# %}

GridSummaryRow groupSummaryRow = new GridSummaryRow()
Expand Down Expand Up @@ -827,11 +821,11 @@ The following screenshot illustrates displaying summary columns with title at sa

![DataGrid with group summary column and title](Images\group-summary\maui-datagrid-group-column-summary-title.png)

### Limitations
#### Limitations

The following are the limitations of displaying column summary along with title at same time for DataGridSummaryRow:

* If FrozenColumnCount is defined as less than DataGridSummaryRow.TitleColumnCount, the title summary will span the range of FrozenColumnCount, since the spanned range and frozen range cannot vary.
* If [FrozenColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_FrozenColumnCount) is defined as less than [DataGridSummaryRow.TitleColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_TitleColumnCount), the title summary will span the range of [FrozenColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_FrozenColumnCount), since the spanned range and frozen range cannot vary.

## Table summaries

Expand Down Expand Up @@ -1284,9 +1278,9 @@ N> The `DataTemplateSelector` can also be directly assigned to the `SfDataGrid.T

### Displaying column summary with title

SfDataGrid supports displaying both column summaries and title summaries simultaneously. You can show column summary along with title by defining the [DataGridTableSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) and DataGridTableSummaryRow.TitleColumnCount property, along with defining summary columns. Showing column summary along with title can be only supported if [DataGridTableSummaryRow.ShowSummaryInRow](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_ShowSummaryInRow) is disabled.
SfDataGrid supports displaying both column summaries and title summaries simultaneously. You can show column summary along with title by defining the [DataGridTableSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) and [DataGridTableSummaryRow.TitleColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_TitleColumnCount) property, along with defining summary columns. Showing column summary along with title can be only supported if [DataGridTableSummaryRow.ShowSummaryInRow](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_ShowSummaryInRow) is disabled.

In the code snippet below, DataGridTableSummaryRow.TitleColumnCount is set as 2, and [DataGridTableSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) is defined along with summary columns.
In the code snippet below, [DataGridTableSummaryRow.TitleColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_TitleColumnCount) is set as 2, and [DataGridTableSummaryRow.Title](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_Title) is defined along with summary columns.

{% tabs %}
{% highlight xaml %}
Expand Down Expand Up @@ -1328,9 +1322,6 @@ In the code snippet below, DataGridTableSummaryRow.TitleColumnCount is set as 2,

</dataGrid:SfDataGrid>
{% endhighlight %}
{% endtabs %}

{% tabs %}
{% highlight c# %}

GridTableSummaryRow topSummaryRow = new GridTableSummaryRow()
Expand Down Expand Up @@ -1380,11 +1371,11 @@ The following screenshot illustrates displaying summary columns with title at sa

![DataGrid with table summary column and title](Images\table-summary\maui-datagrid-table-column-summary-title.png)

### Limitations
#### Limitations

The following are the limitations of displaying column summary along with title at same time for DataGridTableSummaryRow:

* If FrozenColumnCount is defined as less than DataGridTableSummaryRow.TitleColumnCount, the title summary will span the range of FrozenColumnCount, since the spanned range and frozen range cannot vary.
* If [FrozenColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_FrozenColumnCount) is defined as less than [DataGridTableSummaryRow.TitleColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.DataGridSummaryRow.html#Syncfusion_Maui_DataGrid_DataGridSummaryRow_TitleColumnCount), the title summary will span the range of [FrozenColumnCount](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.DataGrid.SfDataGrid.html#Syncfusion_Maui_DataGrid_SfDataGrid_FrozenColumnCount), since the spanned range and frozen range cannot vary.

## Formatting summary

Expand Down
Loading