Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

how to add a pane that allows me to navigate thorugh records on a datagrid view

hi,
how can i achieve this:
http://msdn2.microsoft.com/en-us/library/Aa730861.netvbdev0408(en-US,VS.80).gif
i need to add that pane that will allow me to navigate through the records returned on a datagridview how can i do this?
oh with only one minor change instead of showing on the top i need it to diaply on the top thats all
Thansk,
jsctechy
0
jsctechy
Asked:
jsctechy
  • 3
  • 2
1 Solution
 
Bob LearnedCommented:
Are you looking for something like a BindingNavigator?

Bob
0
 
jsctechyAuthor Commented:
yes that it is exactly what i'm looking for but i dont know how to bing it with my datagridview since i did not use the wizards to do this.
can you show me how to do this?
0
 
Bob LearnedCommented:
1) Add a BindingSource to the form
2) Add a BindingNavigator to the form
3) Select the BindingSource on the navigator from the BindingSource property
4) Set the data source for the BindingSource to be the same one as the DataGridView:

  BindingSource1.DataSource = DataSet1.Tables(0)
5) Set the data source for the DataGridView to the BindingSource.

Bob
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
jsctechyAuthor Commented:
ok i have added done step 1 - 3 but on 4 i'm not sure since i set up the datasource through code like this:


        ad = New SqlClient.SqlDataAdapter(queryString, connectionString)

        Dim commandBuilder As New SqlClient.SqlCommandBuilder(ad)
        Dim table As DataTable = New DataTable()

        Me.ad.Fill(table)
        bindingSource = New BindingSource()
        Me.bindingSource.DataSource = table

        Me.dgvAdds.DataSource = Me.bindingSource
        Me.dgvAdds.Columns.Item(0).Visible = False

how can i also do this for the binding source and the binding navigator?
0
 
jsctechyAuthor Commented:
that is a nice link but it does not show me what i want
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now