Problem Using DoubleTextbox
Good morning
My name is Moreno and I'm Italian.
I do not have a thorough knowledge of English and therefore I rely on the Google translator to expose the problem, and I apologize in advance for the imperfect illustration.
Development Environment: WPF
I have a form where I have to edit data using both the SfDataGrid and the DoubleTextBox
I give an example to clarify the anomalous behavior.
I have to enter the number 125.18 inserting the whole part of the number (125) the value 00 is incorrectly queued.
The value then in the grid is reported only 100.00 instead of 125.18
I report the code used for coding checks.
Datagrid side
<syf:SfDataGrid
ItemsSource="{Binding CassaGiornalieraList}"
SelectedItem="{Binding CurrentRecord,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
AutoGenerateColumns="False"
AllowDraggingColumns="True"
AllowEditing="False"
AllowFiltering="True"
AllowResizingColumns="True"
ShowGroupDropArea="True"
ShowSortNumbers="True"
AllowSorting="True"
AllowTriStateSorting="True"
AutoGenerateColumnsMode="ResetAll"
SelectionMode="Single"
SelectionUnit="Row"
GridCopyOption="CopyData"
GridPasteOption="None"
ColumnSizer="None"
ShowRowHeader="True"
RowHeaderWidth="50"
AutoExpandGroups="False"
HideEmptyGridViewDefinition="True">
<syf:SfDataGrid.Columns>
<syf:GridNumericColumn
HeaderText="Imp. I"
Width="80"
MappingName="ImpInizio"
NumberDecimalDigits="2"
TextAlignment="Right"
ShowHeaderToolTip="True"
ShowToolTip="True">
</syf:GridNumericColumn>
DoubleTextBox side
<syf:DoubleTextBox
Name="ImpInizio"
Margin="120,2,4,2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsEnabled="{Binding IsInEditMode, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding IsInMoneta, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
Text="{Binding CurrentRecord.ImpInizio, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource FocusColor}"
Grid.Column="1"
Grid.Row="4"
MinValue="0"
NumberGroupSizes="3"
NumberGroupSeparator="."
NumberDecimalSeparator=","
NegativeForeground="Red"
TextAlignment="Right"
FontWeight="Bold"
Foreground="Blue"
Width="80"
WatermarkText="Inserisci"
WatermarkTextIsVisible="True"
LostFocus="ImpInizio_LostFocus" TextChanged="ImpInizio_TextChanged"/>
can you help me, maybe with an example project that uses both the DoubleTextBox detail field and the datagrid?
Thank you
Moreno
Attachment: 20171222_ErroreDoubleTextBox_35308a69.zip
My name is Moreno and I'm Italian.
I do not have a thorough knowledge of English and therefore I rely on the Google translator to expose the problem, and I apologize in advance for the imperfect illustration.
Development Environment: WPF
I have a form where I have to edit data using both the SfDataGrid and the DoubleTextBox
I give an example to clarify the anomalous behavior.
I have to enter the number 125.18 inserting the whole part of the number (125) the value 00 is incorrectly queued.
The value then in the grid is reported only 100.00 instead of 125.18
I report the code used for coding checks.
Datagrid side
<syf:SfDataGrid
ItemsSource="{Binding CassaGiornalieraList}"
SelectedItem="{Binding CurrentRecord,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
AutoGenerateColumns="False"
AllowDraggingColumns="True"
AllowEditing="False"
AllowFiltering="True"
AllowResizingColumns="True"
ShowGroupDropArea="True"
ShowSortNumbers="True"
AllowSorting="True"
AllowTriStateSorting="True"
AutoGenerateColumnsMode="ResetAll"
SelectionMode="Single"
SelectionUnit="Row"
GridCopyOption="CopyData"
GridPasteOption="None"
ColumnSizer="None"
ShowRowHeader="True"
RowHeaderWidth="50"
AutoExpandGroups="False"
HideEmptyGridViewDefinition="True">
<syf:SfDataGrid.Columns>
<syf:GridNumericColumn
HeaderText="Imp. I"
Width="80"
MappingName="ImpInizio"
NumberDecimalDigits="2"
TextAlignment="Right"
ShowHeaderToolTip="True"
ShowToolTip="True">
</syf:GridNumericColumn>
DoubleTextBox side
<syf:DoubleTextBox
Name="ImpInizio"
Margin="120,2,4,2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
IsEnabled="{Binding IsInEditMode, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding IsInMoneta, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
Text="{Binding CurrentRecord.ImpInizio, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource FocusColor}"
Grid.Column="1"
Grid.Row="4"
MinValue="0"
NumberGroupSizes="3"
NumberGroupSeparator="."
NumberDecimalSeparator=","
NegativeForeground="Red"
TextAlignment="Right"
FontWeight="Bold"
Foreground="Blue"
Width="80"
WatermarkText="Inserisci"
WatermarkTextIsVisible="True"
LostFocus="ImpInizio_LostFocus" TextChanged="ImpInizio_TextChanged"/>
can you help me, maybe with an example project that uses both the DoubleTextBox detail field and the datagrid?
Thank you
Moreno
Attachment: 20171222_ErroreDoubleTextBox_35308a69.zip
SIGN IN To post a reply.
3 Replies
VR
Vijayalakshmi Roopkumar
Syncfusion Team
January 2, 2018 11:59 AM UTC
Hi Misonsan
Thank you for contacting Syncfusion support.
We have prepared the sample using the provided scenario ,code example and we could able to reproduce the reported issue. This issue occurs when you tried to bind the property in DoubleTextBox using the Text property. To bind the value in DoubleTextBox, the Value property should be used. Now the value in the DoubleTextBox would get correctly updated in the SfDataGrid. Please download the sample from the following location:
Sample: http://www.syncfusion.com/downloads/support/forum/135180/ze/SfDataGridDemo_2013_(2)-1848702583
Thank you for contacting Syncfusion support.
We have prepared the sample using the provided scenario ,code example and we could able to reproduce the reported issue. This issue occurs when you tried to bind the property in DoubleTextBox using the Text property. To bind the value in DoubleTextBox, the Value property should be used. Now the value in the DoubleTextBox would get correctly updated in the SfDataGrid. Please download the sample from the following location:
Sample: http://www.syncfusion.com/downloads/support/forum/135180/ze/SfDataGridDemo_2013_(2)-1848702583
Please try the above solution and let us know if it is helpful.
Regards,
Vijayalakshmi V.R.
MI
misonsan
January 2, 2018 06:11 PM UTC
Thanks Vijayalakshmi Roopkumar
for the assistance provided.
The solution you sent me works correctly and has solved my problem.
Thank you
Moreno
for the assistance provided.
The solution you sent me works correctly and has solved my problem.
Thank you
Moreno
VR
Vijayalakshmi Roopkumar
Syncfusion Team
January 3, 2018 04:14 AM UTC
Hi Moreno
Thank you for the update.
We are glad to hear that we have helped you in this.
Please let us know if you need any other assistance.
Regards,
Vijayalakshmi V.R
Thank you for the update.
We are glad to hear that we have helped you in this.
Please let us know if you need any other assistance.
Regards,
Vijayalakshmi V.R
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
MI misonsan
- Dec 22, 2017 01:29 PM UTC
- Jan 3, 2018 04:14 AM UTC