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. C#
  4. Filtering Dataset

Filtering Dataset

Scheduled Pinned Locked Moved C#
help
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.
  • A Offline
    A Offline
    aranhamarvel
    wrote on last edited by
    #1

    Good Morning, i have a problem! i'd like to filter a dataset but return one dataset object and no one datarow object. ex: DataRow[] dRow = dslocation.Tables[0].Select("text <> 'Any'"); i dont want it. Please help me! :-D Thanks a lot!

    K 1 Reply Last reply
    0
    • A aranhamarvel

      Good Morning, i have a problem! i'd like to filter a dataset but return one dataset object and no one datarow object. ex: DataRow[] dRow = dslocation.Tables[0].Select("text <> 'Any'"); i dont want it. Please help me! :-D Thanks a lot!

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      You need to use a DataView. So something like: DataView dv = dslocation.Tables[0].DefaultView; dv.RowFilter = "Text <> 'Any'" The rows of the DataView will exclude any row has a column text that matches 'Any'. Hope that helps. Ben

      A 1 Reply Last reply
      0
      • K kubben

        You need to use a DataView. So something like: DataView dv = dslocation.Tables[0].DefaultView; dv.RowFilter = "Text <> 'Any'" The rows of the DataView will exclude any row has a column text that matches 'Any'. Hope that helps. Ben

        A Offline
        A Offline
        aranhamarvel
        wrote on last edited by
        #3

        Thanks a lot, but i'd like to put this filters rows in dataset again, only filters rows. :^) thanks again!

        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