GridDateTimeColumn: Copy - Paste, AllowScrollingOnCircle, EnableBackspaceKey, EnableDeleteKey do not work

The SQL Server database table has one (datetime,null) column: 

lastUpdated


The WPF application has a grid:

    AutoGenerateColumns="False"
AllowDeleting="True"
AllowFiltering="True"
NewItemPlaceholderPosition="AtBeginning"
AllowSorting="True"
AutoGenerateRelations="False"
x:Name="SkeuasmataGrid"
EditTrigger="OnTap"
AllowEditing="True"
RowHeaderWidth="35"
CurrentCellActivated="SkeuasmataGrid_CurrentCellActivated"
FilterRowPosition="FixedTop"
SelectionMode="Single"
AllowResizingColumns="True"
EnableDataVirtualization="True"
ItemsSource="{Binding Skeuasmata, Source={StaticResource viewmodel}}" AllowDraggingRows="True" Grid.Row="1">


FilterRowOptionsVisibility="Collapsed"
FilterRowCondition="AfterOrEqual"
MappingName="LastUpdated"
CustomPattern="MM/yy"
Pattern="CustomPattern"
AllowNullValue="True"
DisableDateSelection="True"
CanEdit="True"
AllowScrollingOnCircle="False"
EnableBackspaceKey="True"
EnableDeleteKey="False" />



The CurrentCellActivated event handler is:

private void SkeuasmataGrid_CurrentCellActivated(object sender, CurrentCellActivatedEventArgs e)
{
this.SkeuasmataGrid.SelectionController.CurrentCellManager.BeginEdit();
this.SkeuasmataGrid.ShowRowSelection(e.CurrentRowColumnIndex.RowIndex);
if (!e.PreviousRowColumnIndex.RowIndex.Equals(null))
{
if (e.PreviousRowColumnIndex.RowIndex != e.CurrentRowColumnIndex.RowIndex)
{
this.SkeuasmataGrid.HideRowSelection(e.PreviousRowColumnIndex.RowIndex);
}
}
}


The problems are:

  • Copy & Paste in the GridDateTimeColumn does NOT work. Even though the value is pasted, the database is not updated with the value.
  • AllowScrollingOnCircle has no effect if set to False. I want to move out of the cell when I press the arrow keys. Even though AllowScrollingOnCircle is set to False, pressing the up and down keys change the date value.
  • EnableBackspaceKey has no effect if set to True. If the cell is in edit mode and I press the backspace key (and then Enter) the value is removed from the cell but the database is not updated with the NULL value.
  • EnableDeleteKey has no effect if set to False. If the cell is in edit mode and I press the Delete key (and then Enter) the value is removed from the cell and the database is updated with the NULL value.
Please fix the component.

It is broken.

5 Replies 1 reply marked as answer

SB Sweatha Bharathi Syncfusion Team July 26, 2023 02:36 PM UTC

Dimitris ,



Query

Comments

1. Copy & Paste in the GridDateTimeColumn does NOT work. Even though the value is pasted, the database is not updated with the value.

 

We have analyzed your reported query, and we were unable to reproduce the issue as working fine as expected. After pasting the value, the database is updated with the pasted value.

 

We have provided video for your reference.

2. AllowScrollingOnCircle has no effect if set to False. I want to move out of the cell when I press the arrow keys. Even though AllowScrollingOnCircle is set to False, pressing the up and down keys change the date value.

 

We have checking your reported scenario with provided information , and we need time to validate this , we will update further details on July 28,2023.

3. EnableBackspaceKey has no effect if set to True. If the cell is in edit mode and I press the backspace key (and then Enter) the value is removed from the cell but the database is not updated with the NULL value.

 

We have analyzed your reported query, and we were unable to reproduce the issue as working fine as expected , the database is updated with the null value.

 

We have provided video for your reference.

4. EnableDeleteKey has no effect if set to False. If the cell is in edit mode and I press the Delete key (and then Enter) the value is removed from the cell and the database is updated with the NULL value.

 

According to the behavior of "EnableDeleteKey" property, it is dependent on the "CanEdit" property of GridDateTimeColumn.

 

When the "CanEdit" property is set to true for GridDateTimeColumn, the "EnableDeleteKey" property will not be considered, and the delete key operation will still work even if "EnableDeleteKey" is set to false.

 

On the other hand, if the "CanEdit" property is set to false for GridDateTimeColumn, then the delete key operation will be stopped, and the "EnableDeleteKey" property will be taken into account.


According to our understanding, you are using a DataGrid control, but you have mentioned "griddatacontrol" in the forum page. Can you please confirm if this is the control you are using?

We have prepared a sample for the DataGrid control, Please review the sample and let us know if you are still experiencing the same issue , if yes , modify the sample based on your scenario to reproduces an issue .

It will help us better understand the issue and work towards finding a solution promptly.



Attachment: Sample_and_video_3b20b93e.zip


MI Mimisss July 26, 2023 05:27 PM UTC

Thank you for your answer.

The component is WPF DataGrid: https://help.syncfusion.com/wpf/datagrid/overview





SB Sweatha Bharathi Syncfusion Team July 28, 2023 11:55 AM UTC

Dimitris ,


According to the behavior of AllowScrollingOnCircle, it is only applicable for mouse wheel interaction. However, the up and down keys will always work to change the values, regardless of the AllowScrollingOnCircle property setting. If we set AllowScrollingOnCircle to false, it will only disable the mouse wheel interaction, not up and down arrow keys.


Additionally, in the datagrid, there was a mistake in the XML comments. We have taken the necessary steps to correct the XML comments, and the corrections will be included in the upcoming release.



Marked as answer

DI Dimitris July 28, 2023 01:40 PM UTC

OK.

Thank you very much.



SB Sweatha Bharathi Syncfusion Team July 31, 2023 12:27 PM UTC


Dimitris ,


If you are satisfied with our response, please mark it as an answer. Otherwise, please let us know if you have any further queries on this. We are happy to help you😊.


Loader.
Up arrow icon