Results 1 to 3 of 3

Thread: [2005]

  1. #1

    Thread Starter
    Hyperactive Member ahmad_iam's Avatar
    Join Date
    Jun 2005
    Location
    Pakistan
    Posts
    265

    Lightbulb [2005]

    I have datagrid on form and there are some records that i want to show. And there are two button next and previous.

    Now tell me how i can show next record when i click on next button in the datagrid and prev record when i click on the prev button.


    Thanks
    "Visual Studio .NET 2005/.NET Framework 2.0"

    The eyes are the greatest telescopes, one will ever need to study the universe. Let the heart be the tripod, the mind be the shaft, then let the eyes become the lens of that great telescope of which God gave to us all.

  2. #2
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: [2005]

    Add a condition on select statement to filter the records
    "The dark side clouds everything. Impossible to see the future is."

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [2005]

    Bind your data to a BindingSource and bind your BindingSource to a DatagridView (NOT a DataGrid). You can then call the BindingSource's MoveNext and MovePrevious methods. You can also use a BindingNavigator to automate it.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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