Results 1 to 2 of 2

Thread: DataGrid Problem!

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2002
    Posts
    18

    DataGrid Problem!

    DataGrid Problem!
    'Hi I've tried this code to filter my records.
    DataSet11.Products.DefaultView.RowFilter = "ProductName like '" & txtFilter.Text & "%'"
    'and follows this code to rebind the DataGrid
    DataGrid1.DataSource=DataSet11.Products.DefaultView

    And this code work! But when i want to navigate the record using this code.
    the DataGrid still at the first record.

    Me.BindingContext(DataSet11, "Employee").Position += 1

    Any idea to solve this problem?

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    I think that's the way it should be. You are confusing the bindings:

    You have bound the Datagrid to a Dataview object (DefaultView of dataset table 'Products') but you are changing the position of bindingmanager of the datatable of the dataset not the dataview. Remember that Dataview and DataTable are two different objects.

    That was my idea anyway.
    '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