From 315470e39f217e914d402b3aed59300c8f766b18 Mon Sep 17 00:00:00 2001 From: Malini-SF4235 Date: Fri, 25 Jul 2025 16:03:43 +0530 Subject: [PATCH 1/5] ES-969380-TemplateRenderMode - Provide the UG documentation for TemplateRenderMode. --- wpf/DataGrid/Record-Template-View.md | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/wpf/DataGrid/Record-Template-View.md b/wpf/DataGrid/Record-Template-View.md index 99503e652..43a853185 100644 --- a/wpf/DataGrid/Record-Template-View.md +++ b/wpf/DataGrid/Record-Template-View.md @@ -292,6 +292,38 @@ Arranges template for the ViewPortHeight when the {{'[RowTemplate]( +## TemplateRenderMode Support in TemplateViewDefinition + +[TemplateViewDefinition]((https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Grid.TemplateViewDefinition.html)) support for controlling how row templates are rendered using the `TemplateRenderMode` property. This property determines whether a unique template instance is created for each row or if a template is reused across multiple rows. + + + + + + + + + + + + + + + + - -
+Template Render Mode + +Definition +
+Shared + +Rows and template instances are reused across different rows. +
+Individual + +Row and template instances are created for each row, and a template instance is reused only for its corresponding row reference. +
+ ## Keyboard navigation support for DetailsViewTemplate In the SfDataGrid, you can navigate from parent row to DetailsViewTemplate and vice-versa using Tab key by default. You can also restrict tab key navigation from parent to DetailsViewTemplate by setting the [TemplateViewDefinition.TemplateNavigationMode](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Grid.TemplateViewDefinition.html#Syncfusion_UI_Xaml_Grid_TemplateViewDefinition_NavigationMode) property value to `ExcludeTemplateRow`. From 4e545e56f598d0aa86e8e059ac89e87ebeb4f46e Mon Sep 17 00:00:00 2001 From: Malini-SF4235 Date: Fri, 25 Jul 2025 16:11:37 +0530 Subject: [PATCH 2/5] ES-969380-TemplaterenderMode Commit the changes to the GitHub. --- wpf/DataGrid/Record-Template-View.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wpf/DataGrid/Record-Template-View.md b/wpf/DataGrid/Record-Template-View.md index 43a853185..3bb6ec69a 100644 --- a/wpf/DataGrid/Record-Template-View.md +++ b/wpf/DataGrid/Record-Template-View.md @@ -321,8 +321,7 @@ Rows and template instances are reused across different rows. Row and template instances are created for each row, and a template instance is reused only for its corresponding row reference.
+ ## Keyboard navigation support for DetailsViewTemplate From ae1c518592a4b4741ebce0ade187d1d92901b909 Mon Sep 17 00:00:00 2001 From: Malini-SF4235 Date: Fri, 25 Jul 2025 19:23:25 +0530 Subject: [PATCH 3/5] ES-969380-TemplateRenderMode Committed the changes to the GitHub. --- wpf/DataGrid/Record-Template-View.md | 44 ++++++++++------------------ 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/wpf/DataGrid/Record-Template-View.md b/wpf/DataGrid/Record-Template-View.md index 3bb6ec69a..e4ff2a092 100644 --- a/wpf/DataGrid/Record-Template-View.md +++ b/wpf/DataGrid/Record-Template-View.md @@ -292,36 +292,24 @@ Arranges template for the ViewPortHeight when the {{'[RowTemplate](
-## TemplateRenderMode Support in TemplateViewDefinition +## Handling Row Virtualization in RowTemplate +By default, row are reused in the DataGrid to optimize performance. As a result, if you define a row template containing interactive controls (such as SfDataGrid, DataGrid, and similar components) and perform data operations (like sorting or filtering), the visual state and data bindings of these controls may not always persist correctly. -[TemplateViewDefinition]((https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Grid.TemplateViewDefinition.html)) support for controlling how row templates are rendered using the `TemplateRenderMode` property. This property determines whether a unique template instance is created for each row or if a template is reused across multiple rows. +This is because the same row visual elements are recycled and displayed for different data items during virtualization. - - - - - - - - - - - - - -
-Template Render Mode - -Definition -
-Shared - -Rows and template instances are reused across different rows. -
-Individual - -Row and template instances are created for each row, and a template instance is reused only for its corresponding row reference. -
+To provide greater flexibility, the `TemplateRenderMode` property is available for row templates. This property allows you to configure how the row templates are instantiated and managed within the DataGrid. + +### TemplateRenderMode Options: + +### Shared (Default): +* Rows (and their templates) are reused across multiple rows as you scroll or interact with the grid. +* This mode provides the best performance and lowest memory usage. +* Template instances are reused, some state or data operations on template controls may not be maintained correctly when expanding, collapsing, or scrolling, leading to possible visual or data mismatches. + +### Individual: +* A unique rows and template instance is created for each data row. +* Template instances are not shared or reused across rows. +* Data operations and visual state are always preserved correctly for each row, even after expanding, collapsing, or scrolling. ## Keyboard navigation support for DetailsViewTemplate From 05ee59a5d289bf9f748fd7747dcaecfc6a6099de Mon Sep 17 00:00:00 2001 From: Malini-SF4235 Date: Mon, 28 Jul 2025 19:04:16 +0530 Subject: [PATCH 4/5] ES-969380 Addressed the review concerns --- wpf/DataGrid/Record-Template-View.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/wpf/DataGrid/Record-Template-View.md b/wpf/DataGrid/Record-Template-View.md index e4ff2a092..b3a5b0b89 100644 --- a/wpf/DataGrid/Record-Template-View.md +++ b/wpf/DataGrid/Record-Template-View.md @@ -293,24 +293,29 @@ Arranges template for the ViewPortHeight when the {{'[RowTemplate](
## Handling Row Virtualization in RowTemplate -By default, row are reused in the DataGrid to optimize performance. As a result, if you define a row template containing interactive controls (such as SfDataGrid, DataGrid, and similar components) and perform data operations (like sorting or filtering), the visual state and data bindings of these controls may not always persist correctly. +By default, rows in the `DataGrid` are virtualized and reused to enhance performance. However, when using a RowTemplate that includes interactive controls (such as SfDataGrid, DataGrid, or similar components), this reuse can lead to unexpected behavior during data operations like sorting or filtering. Specifically, the visual state and data bindings of these controls may not persist correctly. -This is because the same row visual elements are recycled and displayed for different data items during virtualization. +This occurs because the same row visual elements are recycled and displayed for different data items during virtualization. To provide greater flexibility, the `TemplateRenderMode` property is available for row templates. This property allows you to configure how the row templates are instantiated and managed within the DataGrid. -### TemplateRenderMode Options: +## TemplateRenderMode: ### Shared (Default): * Rows (and their templates) are reused across multiple rows as you scroll or interact with the grid. * This mode provides the best performance and lowest memory usage. -* Template instances are reused, some state or data operations on template controls may not be maintained correctly when expanding, collapsing, or scrolling, leading to possible visual or data mismatches. +* Since templates are shared, visual state and control data may not persist correctly during operations like expanding, collapsing, or scrolling. This can lead to visual inconsistencies or data mismatches. ### Individual: * A unique rows and template instance is created for each data row. * Template instances are not shared or reused across rows. * Data operations and visual state are always preserved correctly for each row, even after expanding, collapsing, or scrolling. +N> Use `Shared` for maximum performance and when your row template only contains simple data-bound controls with no per-row persistent state. + +Use `Individual` when your row template is contains interactive controls that need to preserve their state for each data row independently. + + ## Keyboard navigation support for DetailsViewTemplate In the SfDataGrid, you can navigate from parent row to DetailsViewTemplate and vice-versa using Tab key by default. You can also restrict tab key navigation from parent to DetailsViewTemplate by setting the [TemplateViewDefinition.TemplateNavigationMode](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Grid.TemplateViewDefinition.html#Syncfusion_UI_Xaml_Grid_TemplateViewDefinition_NavigationMode) property value to `ExcludeTemplateRow`. From 399424111bcd5c46b5c552d61eff07361786f206 Mon Sep 17 00:00:00 2001 From: Deepak Raj Sundar Date: Tue, 29 Jul 2025 14:21:16 +0530 Subject: [PATCH 5/5] Added the release notes MD file and corresponding node entry in the TOC.html file --- wpf-toc.html | 2 +- wpf/Release-notes/v30.1.42.md | 48 +++++++++++++++++++++++++++++++++-- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/wpf-toc.html b/wpf-toc.html index 4f2043247..fcd261b0f 100644 --- a/wpf-toc.html +++ b/wpf-toc.html @@ -2450,7 +2450,7 @@ Word Library (DocIO)
  • Release Notes -