More “How Do I” Videos Released– Setting Field Values Automatically for Easy Data Entry (Beth Massi)

More “How Do I” Videos Released– Setting Field Values Automatically for Easy Data Entry (Beth Massi)

Rate This
  • Comments 1

We just released a couple more “How Do I” videos on the LightSwitch Developer Center:

#19 - How Do I: Set Default Values on Fields when Entering New Data?
#20 - How Do I: Copy Data from One Row into a New Row?

In these videos I show you how to write a bit of code to set values on fields in a couple different ways in order to make it faster for users to enter data. 

And don’t forget you can watch all the How Do I videos here: LightSwitch “How Do I” Videos on MSDN

Enjoy,
-Beth Massi, Visual Studio Community

Leave a Comment
  • Please add 6 and 2 and type the answer here:
  • Post
  • A more practical How Do I, would be to Copy the Currently selected Row:

           Private Sub OrderDetails_Changed(e As System.Collections.Specialized.NotifyCollectionChangedEventArgs)

               If e.Action = Collections.Specialized.NotifyCollectionChangedAction.Add Then

                   ' Clone Selected Order Details

                   If e.NewItems.Count = 1 AndAlso Me.OrderDetails.SelectedItem IsNot Nothing Then

                       Dim newDetail As OrderDetail = e.NewItems(0)

                       newDetail.Quantity = Me.OrderDetails.SelectedItem.Quantity

                       newDetail.Price = Me.OrderDetails.SelectedItem.Price

                   End If

               End If

           End Sub

Page 1 of 1 (1 items)