Results 1 to 3 of 3

Thread: Select

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    Select

    I add a Button and put this code;
    Dim aFind As String = InputBox("Enter a Employee No.", "Search for Employee No.")
    Dim filteredRows() As DataRow = DataSet11.Employee.Select("empno='" & aFind & "'")

    But it has no reaction. The DataGrid still show all the records.
    What's wrong with this?

  2. #2
    Lively Member
    Join Date
    Nov 2002
    Location
    Malaysia
    Posts
    124
    You have to add a clear statement first.
    DataSet11.clear() 'Clear the dataset's data

    and use the sql statement filter it out and fill it into the dataset

  3. #3
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    If you set the datasource of the datagrid to a DataView instead you can use the DataView.RowFilter property to filter your data.

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