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 3841048
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:36:04+00:00 2026-05-19T15:36:04+00:00

I have two tables, called Machine and Type . Since they have a many-many

  • 0

I have two tables, called Machine and Type. Since they have a many-many relationship, I have a MachineType resolution table in my DB. No problem.

The end user needs to be able to manage these – create new types and assign them to machines. I have an XtraGridView that I am using to display the Machine as master and Type as detail.

Initially I used a Lookup to add Type dropdowns to the MachineType detail view. But that creates duplicates and is not the best way to display this information. I’d like a series of checkboxes (one for each Type options available) so the user can click the appropriate ones for each machine, thus avoiding duplicates. Upon saving, the appropriate MachineType rows can be generated.

I was going to just code this manually but if there’s some kind of binary collection mapping in either DevExpress or the .net framework I can use, I’d prefer that than to reinvent the wheel.

Cheers

EDIT: This is what I mean. From this thread. However, they store it as a collection (a string delineated by commas) and not a series of DB rows.

  • 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-19T15:36:05+00:00Added an answer on May 19, 2026 at 3:36 pm

    Are you interested in just returning the values to bind to as a linq query?

    from m in Machine
    from t in Type
    select new {m,t}
    

    This will give you a cross join for each of the pairings
    on save you can just check to see if the MachineType table has the pairing already

    from mt in MachineType
    where mt.MachineId == <machine from list>
    && mt.TypeId == <type from list>
    

    if you want to pass the query lists you can send a list of pairings you can send a dictionary and loop through it or use the Contains() function if dictionaries support that.

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

Sidebar

Related Questions

I have two tables (renamed/refactored for illustrative purposes) with a Many-To-Many relationship in an
I have two tables in my database, called ratings and movies . Ratings: |
I have two tables that are joined together. A has many B Normally you
We have two Tables: Document: id, title, document_type_id, showon_id DocumentType: id, name Relationship: DocumentType
I have two tables, both with start time and end time fields. I need
I have two tables: Table 1: ID, PersonCode, Name, Table 2: ID, Table1ID, Location,
I have two tables called TableA and TableB. TableA has the following fields: TableA_ID
Say I have two tables called A (fields: id, phase, name) and B(fields: id,
I have two tables one called details and the other called c_details. Both tables
Let's say I have two tables one called Customers and one called CustomerAddresses. Then

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.