Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1094957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:02:57+00:00 2026-05-17T00:02:57+00:00

I was looking at snippets and tutorials for quite some time now, but I

  • 0

I was looking at snippets and tutorials for quite some time now, but I can’t find a complete answer – just some bits and pieces.

I have a database with 3 tables:

Product:

  • id uniqueidentifier
  • name nvarchar(50)

Category:

  • id uniqueidentifier
  • name nvarchar(50)

ProductCategory:

  • fk_product uniqueidentifier
  • fk_category uniqueidentifier

Obviously there is a many-to-many relationship involved – a product can have multiple categories and a category can be applied to multiple products.

The next step was to generate ADO.NET Model and the domain service from the database. This is pretty much simple and I think standard.

Now in the view I make use of DataGrid and DataForm provided by the Silverlight 4 Toolkit.

<toolkit:DataForm ItemsSource="{Binding Data, ElementName=ProductsSource}" Name="dataForm1" AutoCommit="True" />

and

<sdk:DataGrid x:Name="dataGird" ItemsSource="{Binding Data, ElementName=ProductsSource}" AutoGenerateColumns="True" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />

The data source ProductsSource is defined as such:

<riaControls:DomainDataSource Name="ProductsSource" QueryName="GetProductsQuery" AutoLoad="True">
        <riaControls:DomainDataSource.SortDescriptors>
            <riaControls:SortDescriptor Direction="Ascending" PropertyPath="title" />
        </riaControls:DomainDataSource.SortDescriptors>
        <riaControls:DomainDataSource.DomainContext>
            <domain:PortfolioDomainContext />
        </riaControls:DomainDataSource.DomainContext>
    </riaControls:DomainDataSource>

Now: What is the best way to present the data from this many-to-many relationship in the view? Is there a way to show a multiselect-enabled listbox inside the DataForm for a property which has an many-to-many relationship associated with it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:02:57+00:00Added an answer on May 17, 2026 at 12:02 am

    This is a possible duplication of this question

    Apparently Many-to-many (where the EF model removes the association table) is not support in RIA services.

    You need to include the association table. I think an association table is only included in an EF model if it contains any extra fields (additional to the 2 foreign keys), or of you break one of the associations and manage one side of the many-to-many relationship yourself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a code snippet that can delete all emails and text messages
I have been looking at using JOGL to create some things and have been
I am looking at http://www.swiftless.com/tutorials/glsl/3_glcolor.html which has the following code snippet: void main() {
I am looking for a WYSIWIG that supports code snippets. I've tried using TinyMCE
I'm looking now a few days for a solution for clickable items in a
I'm looking at the following code snippet: my @ret = <someMethod> return (undef) if(
I am looking for a XSL snippet that simply returns the XML unaltered. It
We are currently using the log4net appender (web.config snippet): <appender name=FileAppender type=log4net.Appender.RollingFileAppender> Looking for
Looking for feedback on : http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools
Looking for an example that: Launches an EXE Waits for the EXE to finish.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.