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. General Programming
  3. Windows Forms
  4. Filtered query - bindingsource

Filtered query - bindingsource

Scheduled Pinned Locked Moved Windows Forms
helpquestiondatabasewpfwcf
2 Posts 2 Posters 3 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.
  • P Offline
    P Offline
    paulsmithx
    wrote on last edited by
    #1

    I'm trying to modify the filtered query example in the Noyes data binding book (ch 8) and have come up with a problem that I expect is reasonably standard: If a user filters outside of the data set, ie the data filter returns 0 rows from the binding source the column names populated in the combo box a cleared. The basic question then is how can I get the shape of a dataset, specifically column names from a dataset with no rows. This is an issue for performance in my case as in the first instance I need JUST the shape of the data set to which the binding source is bound. ie I don't want to retrieve the 100,000 rows in my table and then filter them, I need to apply the filter then refresh the dataset (think search engine). and I would prefer to do this from a control library. Any suggestion would be most welcome. Thanks, Paul

    Y 1 Reply Last reply
    0
    • P paulsmithx

      I'm trying to modify the filtered query example in the Noyes data binding book (ch 8) and have come up with a problem that I expect is reasonably standard: If a user filters outside of the data set, ie the data filter returns 0 rows from the binding source the column names populated in the combo box a cleared. The basic question then is how can I get the shape of a dataset, specifically column names from a dataset with no rows. This is an issue for performance in my case as in the first instance I need JUST the shape of the data set to which the binding source is bound. ie I don't want to retrieve the 100,000 rows in my table and then filter them, I need to apply the filter then refresh the dataset (think search engine). and I would prefer to do this from a control library. Any suggestion would be most welcome. Thanks, Paul

      Y Offline
      Y Offline
      Yongyuth Panyathanaphong
      wrote on last edited by
      #2

      Hi Paul Use "FillSchema" method to get only data structure and call "Fill" method when you need to get data. eg. yyy.FillSchema(dt, ....mapped) xxx.DataSource=dt

      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