Search

List Detail data binding bugs when no Tabout and record selection changed by Ed Taylor

Closed
as Fixed Help for as Fixed

5
0
Sign in
to vote
Type: Bug
ID: 726859
Opened: 2/27/2012 6:22:01 PM
Access Restriction: Public
0
Workaround(s)
5
User(s) can reproduce this bug
In screens which use a list / detail data binding combination, under certain data entry/update scenarios, data binding between a control in the Detail area and the underlying collection is not working as expected.

The problems affect screens using either a List control or a DataGrid control for the List area of the screen.

The problems occur when the user enters text in the Detail area, does not tab out, and clicks the List/Grid to change to another row.

There are two variations of the data binding problem (one in each data binding direction):

1. The text typed by the user in the control in the Detail area does not update (and dirty) the underlying row when clicking to change row selection.

2. The text typed by the user in the control in the Detail area is not replaced (reset to an empty value) after clicking to change row selection if the value in the newly selected row is empty. Applicable to columns that are optional in the Entity.

Details (expand)

LightSwitch Release Version

Version 1.0

Product Language

English

Steps to reproduce

Use Case 1 (Text typed in control does not dirty the row)

1. Enter text into a TextBox or DatePicker control in the Detail area. Do not tab out.

2. Click to change rows by clicking in an area of the List or DataGrid control that does not accept focus. In the List control this can happen if the user clicks too close to the left edge of the control. In the DataGrid control it happens if the user clicks in the RowHeader (aka Record Selector) area.

The click causes row selection to change but the data typed by the user is lost. It never made it to the underlying collection, and the row the user updated is not dirtied as expected.

Note: the row *is* dirtied (even though no tabout) if the user:
a) clicks anywhere else in the row except near the left edge or in the row header area
b) or, clicks to close the screen
c) or, clicks the Save button
For b & c the user is prompted about having unsaved changes.

Use Case 2 (Text typed by the user is not replaced if column value is empty in target row)
1. Enter text into an optional TextBox or DatePicker control in the Detail area. Do not tab out.

2. Click to change rows by selecting another row that happens to *not* have a value in that column. The click can be anywhere on the row in this case.

The click causes row selection to change, but the value typed in the Detail area control for the original row remains visually in the Detail area of the new row instead of being replaced by the new row's empty value for that column.

Detail area controls that I have tested which exhibit these data binding problems include TextBox and DatePicker. Other controls may also be affected.

See videos:
http://screencast.com/t/jK63NgvNuL5r
http://screencast.com/t/9v9XlcSmIYyO
http://screencast.com/t/44NnaMNE
http://screencast.com/t/UjYAn0tuwdD (by Jewel Lambert / Partner)

See forum thread: http://social.msdn.microsoft.com/Forums/en-US/lightswitch/thread/58c4541d-b4e6-4441-ac45-11167d8750a3

Operating System

Windows 7

Operating System Language

English

Actual results

Described above

Expected results

1. Text typed by the user on one row should bind correctly to the underlying collection when the user clicks to select another row.

2. When the user clicks to select another row, all values in the new row should bind correctly and be reflected visually in the Detail area controls.
File Attachments
File Name Submitted By Submitted On File Size  
1240325849_video-convert-master-v8.0.5.24.rar (restricted) 3/4/2012 -
Sign in to post a comment.
Posted by Ed Taylor on 3/8/2012 at 6:20 PM
Many thanks! Looking forward to the fix in VS11.
Posted by Microsoft on 3/8/2012 at 12:51 PM
Thank you for bringing this issue to our attention. We were able to isolate the issue and resolve it. Look for this resolution in VS11.
Sign in to post a workaround.