diff --git a/grid-sdk/winui/data-grid/Column-Types.md b/grid-sdk/winui/data-grid/Column-Types.md index 887a215ba..eabccec9f 100644 --- a/grid-sdk/winui/data-grid/Column-Types.md +++ b/grid-sdk/winui/data-grid/Column-Types.md @@ -862,7 +862,7 @@ When `ShowClearButton` is set to `True`, a clear button is displayed in the cell The behavior of the clear button depends on the [AllowNull](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.DataGrid.GridNumericColumn.html#Syncfusion_UI_Xaml_DataGrid_GridNumericColumn_AllowNull) property: - - When `AllowNull` is `True`, clicking the clear button sets the cell value to null. + - When `AllowNull` is `True`, clicking the clear button sets the cell value to `null`. - When `AllowNull` is `False`, clicking the clear button sets the cell value to the column's [MinValue](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.DataGrid.GridNumericColumn.html#Syncfusion_UI_Xaml_DataGrid_GridNumericColumn_MinValue). @@ -1577,6 +1577,39 @@ this.dataGrid.Columns.Add(new GridTimeColumn() { HeaderText = "Delivered Time", Hide Submit Buttons from Dropdown Time Spinner in WinUI TimeColumn +### Clear Button support + +The `GridTimeColumn` provides a clear button feature that enables users to reset cell values during editing using the **ShowClearButton** property. +When `ShowClearButton` is set to `True`, a clear button appears within the editor, providing users with a convenient way to clear the cell's value. + +**AllowNull Behavior** + +The behavior of the clear button depends on the [AllowNull](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.DataGrid.GridTimeColumn.html#Syncfusion_UI_Xaml_DataGrid_GridTimeColumn_AllowNull) property: + +- When `AllowNull` is `True`, clicking the clear button sets the cell value to `null`. + +- When `AllowNull` is `False`, clicking the clear button keeps the cell value unchanged. + +{% tabs %} +{% highlight xaml %} + + + + + + + + + +{% endhighlight %} +{% endtabs %} + +GridTimeColumn with Clear Button + ## GridToggleSwitchColumn [GridToggleSwitchColumn](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.DataGrid.GridToggleSwitchColumn.html) derived from [GridColumn](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.DataGrid.GridColumn.html) and it is used to display `Boolean` type data. It hosts [ToggleSwitch](https://docs.microsoft.com/en-us/windows/winui/api/microsoft.ui.xaml.controls.toggleswitch?view=winui-3.0) element as [GridCell](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.DataGrid.GridCell.html) content. diff --git a/grid-sdk/winui/data-grid/Column-Types_images/winui-datagrid-TimeColumn-ShowClearButton.png b/grid-sdk/winui/data-grid/Column-Types_images/winui-datagrid-TimeColumn-ShowClearButton.png new file mode 100644 index 000000000..d136ff866 Binary files /dev/null and b/grid-sdk/winui/data-grid/Column-Types_images/winui-datagrid-TimeColumn-ShowClearButton.png differ diff --git a/grid-sdk/winui/tree-grid/Column-Type-images/winui-treegrid-TimeColumn-ShowClearButton.png b/grid-sdk/winui/tree-grid/Column-Type-images/winui-treegrid-TimeColumn-ShowClearButton.png new file mode 100644 index 000000000..657771de6 Binary files /dev/null and b/grid-sdk/winui/tree-grid/Column-Type-images/winui-treegrid-TimeColumn-ShowClearButton.png differ diff --git a/grid-sdk/winui/tree-grid/ColumnTypes.md b/grid-sdk/winui/tree-grid/ColumnTypes.md index a76e7d2e5..1646909b9 100644 --- a/grid-sdk/winui/tree-grid/ColumnTypes.md +++ b/grid-sdk/winui/tree-grid/ColumnTypes.md @@ -1012,7 +1012,7 @@ When `ShowClearButton` is set to `True`, a clear button appears within the edito The behavior of the clear button depends on the [AllowNull](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.TreeGrid.TreeGridDateColumn.html#Syncfusion_UI_Xaml_TreeGrid_TreeGridDateColumn_AllowNull) property: -- When `AllowNull` is `True`, clicking the clear button sets the cell value to null. +- When `AllowNull` is `True`, clicking the clear button sets the cell value to `null`. - When `AllowNull` is `False`, clicking the clear button sets the cell value to the column's [MinDate](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.TreeGrid.TreeGridDateColumn.html#Syncfusion_UI_Xaml_TreeGrid_TreeGridDateColumn_MinDate). {% tabs %} @@ -1220,6 +1220,43 @@ treeGrid.Columns.Add(new TreeGridTimeColumn() For more information refer [here](https://help.syncfusion.com/winui/time-picker/time-restriction#select-time-as-you-scroll-spinner). +### Clear Button support + +The `TreeGridTimeColumn` provides a clear button feature that enables users to reset cell values during editing using the **ShowClearButton** property. +When `ShowClearButton` is set to `True`, a clear button appears within the editor, providing users with a convenient way to clear the cell's value. + +**AllowNull Behavior** + +The behavior of the clear button depends on the [AllowNull](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.TreeGrid.TreeGridTimeColumn.html#Syncfusion_UI_Xaml_TreeGrid_TreeGridTimeColumn_AllowNull) property: + +- When `AllowNull` is `True`, clicking the clear button sets the cell value to `null`. +- When `AllowNull` is `False`, clicking the clear button keeps the cell value unchanged. + +{% tabs %} +{% highlight xaml %} + + + + + + + + + + +{% endhighlight %} +{% endtabs %} + +TreeGridTimeColumn with Clear Button + ## TreeGridCheckBoxColumn [TreeGridCheckBoxColumn](https://help.syncfusion.com/cr/winui/Syncfusion.UI.Xaml.TreeGrid.TreeGridCheckBoxColumn.html) derived from `TreeGridColumn` and it used display and edit `Boolean` type data. It hosts `CheckBox` element as `TreeGridCell` content.