Results 1 to 2 of 2

Thread: Rebinding DataGrid

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2002
    Posts
    18

    Rebinding DataGrid

    Hi I've tried this code to filter my records.

    DataSet11.Products.DefaultView.RowFilter = "ProductName like '" & txtFilter.Text & "%'"

    The DataGrid DataSource property is: Dataset11
    and its DataMemeber is: Products

    I don't know how to rebind the DataGrid.

    Kindly show me how?

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    I am not sure what i am saying here is 100% technically correct, but I guess as you are binding your datagrid to dataset table then filtering that dataset table default view wont affect your datagrid as they are different objects( a data table and a dataview), even unbinding your datagrid and binding it again wont do the trick. One quick way i can think of is binding your datagrid to the default view of datatable at run time.
    VB Code:
    1. mydatagrid.DataSource=DataSet11.Products.DefaultView
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

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