locked
Exception when remove(key) in a semantic Zoom ListView

    Question

  • Hi all,

      I downloaded semanticZoom and Grouping ListView sample (http://code.msdn.microsoft.com/windowsapps/ListView-grouping-and-11bfc089).

      I add property selectionMode: multi and tap: select on listview2a.

      Now i tried to delete selected items on listview2a by remove(key).

      I found it will cause exception when updateSlots().

      May i know if it's a known issue?

      Tks.

     

    (more info. it works correctly if it's not a semantic zoom list (listview1)


    - Slash
    Tuesday, November 22, 2011 2:52 AM

Answers

All replies

  • Hi Slash,

    I was not able to duplicate your problem.  Can you post the edits you made?

    If you are removing more than one item at a time from the ListViewDatasource you should be using: beginEdits and endEdits.

    http://msdn.microsoft.com/en-us/library/windows/apps/hh440958(v=VS.85).aspx

     


    Jeff Sanders (MSFT)
    Tuesday, November 22, 2011 7:21 PM
    Moderator
  • Hi Jeff,

    Thanks for your prompt reply.

    I use beginEdits and endEdits when removing items.

    1. Add deleteSelection() as http://msdn.microsoft.com/en-us/library/windows/apps/br211852%28v=VS.85%29.aspx
    2. Change listview id in deleteSelection() to "listView2a"
    3. Remove specifing dataSource/groupDataSource from default.html for listView2a and listView2b.
    4. set crossslide: "select", selectionMode: "multi"
    5. add a button to bind to deleteSelection
    6. In case 2 in onscenariochanged(),
          - WinJS.UI.getControl(id("listView2a")).dataSource = myGIDS;
          - WinJS.UI.getControl(id("listView2a")).groupDataSource = myGDS;
          - WinJS.UI.getControl(id("listView2b")).dataSource = myGDS;
          - WinJS.UI.getControl(id("listView2b")).GroupDataSource = myGDS;

    Tks.


    - Slash
    • Edited by - Slash Wednesday, November 23, 2011 6:11 AM
    Wednesday, November 23, 2011 2:26 AM
  • Hi Jeff,

    Please let me know if you can replicate this issue.

    Thank you. :)


    - Slash
    Monday, November 28, 2011 9:01 AM
  • I can!  Thanks Slash, I will update you with what I find.  I filed a bug on this problem for you!

    -Jeff


    Jeff Sanders (MSFT)
    Monday, November 28, 2011 6:52 PM
    Moderator