bindingNavigation issues

xswzaq

Well-known member
Joined
Jul 9, 2007
Messages
61
Programming Experience
Beginner
VB.NET:
Dim DatagridView As New OracleClient.OracleDataAdapter("SELECT table1.seq, table2.lot, table3.bin FROM Table1,  table2, table3", conn)

'Fill Datagrid

Dim Dataset As DataSet = New DataSet("DatagridView")

DatagridView.Fill(Dataset, "DatagridView")

me.Grid.DataSource = Dataset

me.Grid.DataMember = "DatagridView"


I got this code fill successfully in the grid. As you can see in my sql, the data is combination from more 3 different table, together put into one table and I got more than 1 sql statement (to handle search, evytime users enter different information for search, it will go out and bring back different data) which fill in one table (datagrid). Everything is fine but I could not get the binding navigator to work. I want to see how many record is in my table and want to get the bindingnevigator next/previous/first/last? Is there a way to do it?
 
I got it to work by using this code (below), Thanks all for vewing.


Dim bs As New BindingSource
Dim dt As New DataTable

DatagridView .Fill(dt)
bs.DataSource = dt
me.Grid.DataSource = bs
me.Grid.BindingSource = bs
 
Back
Top