Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleted Rows not Automatically Disappearing from Grid
Message
From
26/02/2014 07:54:44
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Deleted Rows not Automatically Disappearing from Grid
Environment versions
Environment:
C# 4.0
OS:
Windows 8
Network:
Windows 2000 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01595349
Message ID:
01595349
Views:
32
Hi,

this is a MM.NET 2010 WPF application.

My clients very rarely delete records so this has never been noticed before. I use a screen that has two pages, one for searching and displaying found records (the records are displayed in a datagrid) and one for editing the details of the selected row in the datagrid.

If I delete a record, the record does get deleted from the backend, but the grid still displays the deleted record until I run a search again.

This is how the DataGrid is defined in the XAML:
						<DataGrid Margin="5" 
                                         x:Name="grdCustomers" 
                                         IsSynchronizedWithCurrentItem="True" 
                                         Grid.Row="8" 
                                         ItemsSource="{Binding Mode=OneWay}" 
                                         SelectionMode="Single" 
                                         GridLinesVisibility="None" 
                                         HeadersVisibility="Column" 
                                         Grid.Column="0" 
                                         AutoGenerateColumns="False" 
                                         Grid.ColumnSpan="3" 
                                         Style="{DynamicResource HDSDataGridStyle}" 
                                         PreviewMouseDoubleClick="grdCustomers_PreviewMouseDoubleClick">
                            <DataGrid.Columns>
                                <DataGridTextColumn Header="Last Name" Width="0.3*" Binding="{Binding cus_lastname, Mode=Default}" IsReadOnly="True"/>
                                <DataGridTextColumn Header="First Name" Width="0.2*" Binding="{Binding cus_firstname, Mode=Default}"  IsReadOnly="True" />
                                <DataGridTextColumn Header="Dept. #" Width="0.2*" Binding="{Binding cus_number, Mode=Default}"  IsReadOnly="True"/>
                                <DataGridTextColumn Header="Company" Width="0.4*" Binding="{Binding cus_company, Mode=Default}"  IsReadOnly="True"/>
                                
                            </DataGrid.Columns>
                        </DataGrid>
My Search button runs this code:
            mmBindingList<CustomerEntity> Customer = this.Customer.SearchCustomers(this.txtLastNameSearch.Text
                                                                                    , this.txtNumberSearch.Text
                                                                                    , selectedArea
                                                                                    , this.txtCompanySearch.Text
                                                                                    , selectedStatus
                                                                                    , selectedBoxType
                                                                                    , selectedRoute
                                                                                    , selectedZipX
                                                                                    , selectedMail
                                                                                    , selectedMiami
                                                                                    , selectedHeathrow
                                                                                    , selectedCredit
                                                                                    , selectedCash
                                                                                    ,selectedHold
                                                                                    , selectedInsurance
                                                                                    , selectedWithEmail
                                                                                    , selectedWithoutEmail
                                                                                    ,selectedCustoms
                                                                                    , selectedServiceFee
                                                                                    , this.txtEmailSearch.Text
                                                                                    );

            this.DataContext = Customer;
The delete button is defined like this:
                            <mmwpf:mmButtonDelete VerticalAlignment="Center" Margin="0,0,0,10" x:Name="btnDelete" />
Any ideas why this could not be working properly?
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Next
Reply
Map
View

Click here to load this message in the networking platform