dcsimg
Results 1 to 3 of 3

Thread: Multiple Users and Multiple User Details on same form

  1. #1

    Thread Starter
    Fanatic Member schoemr's Avatar
    Join Date
    Apr 2016
    Location
    South Africa
    Posts
    940

    Multiple Users and Multiple User Details on same form

    Hi,

    I have two tables that is one to many.

    I have a User (top grid) and in bottom grid the tasks for that User. In this example User 4 have completed 2 tasks.

    In this form on the left hand side is User and associated Tasks and on the right hand side is User with associated Tasks.

    I want to compare User 4 to User 5 (on the same form) In the left hand side User 4 is selected and below is tasks. Now on the right hand side (top grid) If I select User 5 then on the Left hand side user 5 is also selected.

    Whatever I do on left is reflected on right and vice versa.

    How can I have this (left hand side and right hand side) work independently from each other?

    Name:  tasks.jpg
Views: 95
Size:  19.4 KB

    Thanks
    Don't miss the whole point of the dance...

    https://www.youtube.com/watch?v=qHnIJeE3LAI

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,204

    Re: Multiple Users and Multiple User Details on same form

    Use separate BindingSources. If you're not sure how to have the lower grid filter child records by parent then check out my CodeBank thread on Master/Detail data-binding. If you have four different BindingSources then you can just bind the two DataTables but have the bound controls work independently. It's the binding that controls the selection and filtering so that's what needs to be independent.

  3. #3
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,204

    Re: Multiple Users and Multiple User Details on same form

    Having said that, you may actually have to create two DataViews of your child table and bind the child BindingSources to those rather than to the DataTable to enable independent filtering. I'm not 100% sure so try without first but, if it doesn't work, give that a go.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width