Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Searching through a paged ObjectDataSource

Searching through a paged ObjectDataSource

Scheduled Pinned Locked Moved ASP.NET
algorithmsquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JFord1234
    wrote on last edited by
    #1

    Hi, I've built a page that has a GridView using an ObjectDataSource to display data, in pages of 30 rows per page. The table that's being paged has 26,000 values, and since it's very hard to find a certain value by going one page after another I'd like to add a search option to the gridview. I've tried switching my datasource from the ObjectDataSource to a method that retrieves a DataSet with the search results, but that way I can't use the edit or delete buttons and I will have to implement the RowDeleting and such, and that's too much of a hussle. What I'm looking for is a way to search through the ObjectDataSource, is it possible? Or would I have to build another DataSource and keep switching from one to another when searching/viewing all values? I hope I'm clear. Thanks

    J 1 Reply Last reply
    0
    • J JFord1234

      Hi, I've built a page that has a GridView using an ObjectDataSource to display data, in pages of 30 rows per page. The table that's being paged has 26,000 values, and since it's very hard to find a certain value by going one page after another I'd like to add a search option to the gridview. I've tried switching my datasource from the ObjectDataSource to a method that retrieves a DataSet with the search results, but that way I can't use the edit or delete buttons and I will have to implement the RowDeleting and such, and that's too much of a hussle. What I'm looking for is a way to search through the ObjectDataSource, is it possible? Or would I have to build another DataSource and keep switching from one to another when searching/viewing all values? I hope I'm clear. Thanks

      J Offline
      J Offline
      just3ala2
      wrote on last edited by
      #2

      There is a workaround to do this is by setting "DefaultValue" of the "SelectParameters" of your object datasource. This depends on how and what u r calling exaclty :)

      Best Regards 3ala2 :)

      J 1 Reply Last reply
      0
      • J just3ala2

        There is a workaround to do this is by setting "DefaultValue" of the "SelectParameters" of your object datasource. This depends on how and what u r calling exaclty :)

        Best Regards 3ala2 :)

        J Offline
        J Offline
        JFord1234
        wrote on last edited by
        #3

        Works! Thanks :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups