Datagrid not displaying results in correct format

I have a union select query that populates a dataset which in turn fills up a datagrid.  When the datagrid is populated it has a + when the click the + it read Table and then when you click table it displays the data in the datagrid.  How can I get the data to display immediately.

thank you

MySQL = "Select Firstname, MiddleName, lastname, 'ABSENTEE' as SOURCE from absentee where  lastname like '" & lname & "%' UNION " & _
                "Select Firstname, MiddleName, lastname, 'NLC' from NLC as SOURCE where lastname like '" & lname & "%' UNION " & _
"Select ownername1, '' ,'','PROPERTY_TAX' as SOURCE from propertytax where ownername1 like  '" & lname & "%'"
       Dim MyDataSet As New DataSet
                'DataGrid1.DataMember = "MyDataAdapter"
                DataGrid1.DataSource = MyDataSet  
Who is Participating?
You might try to set the datasource to MyDataSet.Tables(0)
running32Author Commented:
  DataGrid1.DataSource = MyDataSet.Tables(0) still give me the same results.  Thanks
running32Author Commented:
 DataGrid1.DataMember = MyDataSet.Tables(0).TableName

got it Thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.