<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Have you tried manually refreshing the CollectionView after update
    by CollectionView.Refresh()?<br>
    <br>
    --<br>
    -- Luk&aacute;&#353;<br>
    <br>
    <br>
    On 18.8.2010 17:35, Ken MacDonald wrote:
    <blockquote
      cite="mid:AANLkTinHPyp17kixXu5HM9feQTLRieJ0RKeeOXTFo0JG@mail.gmail.com"
      type="cite">I have inherited a WPF/ipy app which is using data
      binding / CollectionView to interact with a customer list. Steps
      are roughly:<br>
      <br>
      1. query cust. list from DB, sorted by name<br>
      2. bind this to a CollectionView<br>
      3. step through the list, displaying 1 cust. at a time using the
      CollectionView.Next/Previous (forget the exact name) operators,<br>
      &nbsp;&nbsp;&nbsp; moved thru the list in alpha-sorted order<br>
      4. re-sort the list by, say, customer type. Still moves thru the
      list with Next/Previous except now sorted by type, no longer by
      alpha.<br>
      &nbsp;&nbsp;&nbsp; Perfect so far, but............<br>
      <br>
      5. New customers (maybe) have been added to the DB. I re-query the
      customer list to pick up any new ones. The new list is sorted by&nbsp;
      customer type (remembered my last sort criteria).<br>
      6. bind this to a CollectionView. <br>
      7. step thru the list, using Next/Previous on the CollectionView.
      The customers appear in <b>utterly random order</b>, not by
      alpha, not by customer type.<br>
      <br>
      So, I'm a bit stymied. I've been looking through the MSDN but
      haven't seen anything that addresses how to update
      CollectionView/data binding to reflect new data in the customer
      list, or whether it is, in fact, possible to do so. I've found a
      couple of hints, and tried dozens of variations on the code that
      seems like it should "just work". It's quite tempting to just
      maintain my own lists and navigation in python.<br>
      <br>
      I've deliberately NOT included any code; for one thing, it's
      scattered over a number of modules of python (and XAML) but am
      interested in how any of you would approach the
      re-binding-to-new-data problem; also, if any of you tried it and
      found it equally as bizarre and arcane and impossible as it seems
      to be for my app.<br>
      Thanks!<br>
      Ken<br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a>
<a class="moz-txt-link-freetext" href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>