Results 1 to 2 of 2

Thread: "Bind" DataGrid to ComboBox - bound in wrong direction

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2013
    Posts
    134

    "Bind" DataGrid to ComboBox - bound in wrong direction

    Hello to everybody!

    I have a DataGrid - populated by DataSource property - set to a TableBindingSource. (When the form loads all records in the table are displayed)
    I have a ComboBox - populated by DataSource property - set to a BindingSource which has only two columns (ID, Title)

    I want to update the DataGrid according to the item selected in the Combobox. The desired behaviour is that the DataGrid shows only those records where seller_id(in the TableBindingSource of the DataGrid) is equal to the selected Combobox row id.

    I set up the binding of the ComboBox as I thought it would be correct. But now, when I select a record in the DataGrid my ComboBox gets updated to the right Seller title, while selecting anything in the ComboBox has no effect on the DataGrid.

    I will appreciate any comments.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Apr 2013
    Posts
    134

    Re: "Bind" DataGrid to ComboBox - bound in wrong direction

    OK, I have again not understood the concepts behind this, I found a thread(http://www.vbforums.com/showthread.p...obox-selection which seems to handle my problem, the key point is to use Filter property to the BindingSource. I'll try that now

Posting Permissions

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



Click Here to Expand Forum to Full Width