Tab into new row DataGridDoubleColumn

Editors for WPF Forum

Posted 2 years ago by Ansgar
Version: 16.1.0633
Environment: Windows 7 (64-bit)
Avatar

Hi,

I want to use the DataGridDoubleColumn like in the following snippet:

public class Point
{
     public double x { get; set; }
     public double y { get; set; }
}

public ObservableCollection<Point> Points { get; set; }

 

        <datagrid:ThemedDataGrid
                x:Name="dataGrid"
                Grid.Row="1" Grid.Column="0"
                ItemsSource="{Binding Points}"
                AutoGenerateColumns="False"
                CanUserAddRows="True">
            <DataGrid.Columns>
                <datagrideditors:DataGridDoubleColumn Binding="{Binding x}" Header="X" Format="F3" Width="*"/>
                <datagrideditors:DataGridDoubleColumn Binding="{Binding y}" Header="Y" Format="F3" Width="*"/>
            </DataGrid.Columns>
        </datagrid:ThemedDataGrid>

 If the RowHeader of the new row (to add new data) is selected and one presses the TAB-Key some Text-Input is focused. The user can input some values but after hitting Enter or selecting another row no new row gets inserted into the grid. Instead the values stay in the new row "template".

After clicking once on one of the cells of the new row placeholder, the former value is replaced by 0.000 and after two following clicks the user can enter again a value. This time after pressing Enter or selecting another row, a new row is inserted.

How can I fix this behavior? Or is it a Bug?

Best regards,
Ansgar

Comments (4)

Posted 2 years ago by Ansgar
Avatar

Same can be reproduced in the DataGridAddonsDemo:

Click on the first column of the new row (last row). Then press three times TAB.

Now the month field of the date column should be focused. If you enter some data here and then press enter, no new row will be inserted.

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Thank you for letting us know about this.  We spent a while debugging it today but have been unable thus far to determine why DataGrid is behaving that way.  The code that commits the value (which is not working correctly in this scenario) is within Microsoft's DataGrid class in the .NET framework.  It should be seeing the Enter key press from our edit box.

We are going to be reworking the edit box controls in the next couple months in an effort to simplify their design.  We will revisit this during that time to see if design changes we will make will correct this issue.


Actipro Software Support

Posted 2 years ago by Ansgar
Avatar

Thx a lot for the quick response.

Do you have any ideas how I could circumvent this issue?

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Unfortunately not, since we weren't able to figure out what triggers the incorrect behavior.  Much of that logic is in Microsoft's closed source.


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 12 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.