Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Displaying Multiple Data Lists From One Source Data Ent... RSS

11 replies

Last post Jul 07, 2009 09:09 PM by Nic Oughton

(0)
  • ColinBlair

    ColinBlair

    All-Star

    29935 Points

    5031 Posts

    Re: Displaying Multiple Data Lists From One Source Data EntitySet

    Jul 07, 2009 08:55 PM | LINK

    Great. BTW, the Silverlight.net code editor removes generics, that is why all of your lists lost the generic.

    However, I would recommend you try the code I posted above instead of what you came up with. The difference is that the code I posted uses EntityCollection so you can directly add and delete entities from the filtered list. Also, EntityCollection supports INotifyCollection changed so, for example, if you changed the type of a meal from Dinner to Snack the changed meal would automatically move from the Dinner section to the Snack section. You also will not need that code in Context_Loaded. After I post this I will go back and put snacks in for you, if snacks isn't there yet check back in a few minutes.

    EDIT: Oops, EntityCollection, not EntityList.

  • Nic Oughton

    Nic Oughton

    Member

    9 Points

    13 Posts

    Re: Displaying Multiple Data Lists From One Source Data EntitySet

    Jul 07, 2009 09:09 PM | LINK

    Thats works a treat too!

    I have marked this second sample as the answer to this thread. I also moved my create datasource and datasource setting statement back to their original locations and it all works fine. I shall spend some time digesting this second, newer, improved method a little more.

     Again thanks for all your help on this - I can now move on to the next stage of my SL3 + RIA experimentation!

     

    Nic