Silverlight / WPF - delete command - Asked By David on 01-Jul-10 04:25 PM

Delete button deletes data rows but exit xaml sheet and return to it and deleted rows are back

David

Peter Bromberg replied to David on 01-Jul-10 06:02 PM

You haven't provided enough information. Where are the data rows coming from? Is this WPF or Silverlight?

How did the delete button get there, and what code does it run?


This is basic posting netiquette - you have to provide sufficient information for people to actually be able to help.


David replied to Peter Bromberg on 04-Jul-10 03:21 AM

Sorry Peter I am new to WPF & XAML

The delete button was made from following the Beth Massi video on Data input sheet and information comes from  access Data base. It deletes while I have the form open but close and open again and the row or rows are back. It is not deleteing from the Data-base I assume.I am using a DataSet & Tableadapter



Private Sub btndelete_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles btnDelete.Click


If Me.view.CurrentPosition > 1 Then






Dim row = CType(Me.view.CurrentItem, System.Data.DataRowView).Row

row.Delete()



End If

  





End Sub

Thanks David