Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Event to call when value changes
Message
From
23/01/2013 11:09:00
 
 
To
22/01/2013 12:22:54
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01563626
Message ID:
01563819
Views:
62
>Hi,
>
>I have a datagrid which displays the lineitems in an air waybill. Whenever a value in the amount column is changed I want to refresh another textbox with the total of all amounts in the lineitems but I don't know what event to use.
>
>My grid is defined like this:
>
>
<DataGrid AutoGenerateColumns="False" Grid.Row="1" Grid.Column="3" 
>                                  Height="Auto" 
>                                  HorizontalAlignment="Stretch" 
>                                  Margin="0" 
>                                  Name="grdAirWayBillDetails" 
>                                  VerticalAlignment="Stretch" 
>                                  Width="Auto" 
>                                  IsSynchronizedWithCurrentItem="True" 
>                                  ItemsSource="{Binding Mode=default}" 
>                                  SelectionMode="Single" 
>                                  GridLinesVisibility="None" 
>                                  HeadersVisibility="Column" 
>                                  Grid.ColumnSpan="2" 
>                                 
>                                  CanUserAddRows="False" 
>                                  CanUserDeleteRows="False" 
>                                  SelectionUnit="Cell" 
>                                  Grid.RowSpan="4">
>                            <DataGrid.Resources>
>                                <Style x:Key="AlignRight" TargetType="DataGridCell">
>                                    <Setter Property="HorizontalAlignment" Value="Right" />
>                                    
>                                </Style>
>                                <Style x:Key="AlignRightHeader" TargetType="DataGridColumnHeader">
>                                    <Setter Property="HorizontalAlignment" Value="Right" />
>                                </Style>                            </DataGrid.Resources>
>                            <DataGrid.Columns>
>                                <DataGridComboBoxColumn Header="Charge Type" Width="2*" 
>                                                        DisplayMemberPath="cty_name" 
>                                                        SelectedValuePath="cty_pk" 
>                                                        SelectedValueBinding="{Binding awd_ctyfk, Mode=Default}"/>
>
>                                <DataGridTextColumn Header="Amount" Width="*" Binding="{Binding awd_amount, Mode=default}"
>                                                    CellStyle="{StaticResource AlignRight}"
>                                                    HeaderStyle="{StaticResource AlignRightHeader}"/>
>                            </DataGrid.Columns>
>                        </DataGrid>
>
>Basically I need a EnteredValueChanged event on the Amount column.

Does the class with 'awd_amount' implement INotifyPropertyChanged ? If so you could handle the event and update the TextBox from there.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform