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. Database & SysAdmin
  3. Database
  4. How to filter Dataset

How to filter Dataset

Scheduled Pinned Locked Moved Database
data-structurestutorialquestion
2 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.
  • D Offline
    D Offline
    divyesh1432
    wrote on last edited by
    #1

    Hi all, I have a dataset which has 3 tables. They have relation by ds.Relations.Add(...) Now I want a filteration like a master table i.e. ds.tables(0) should be filtered by one column like ds.tables(0).Select("Site_ID = 5") (which will return datarow array now) and I want its children rows should be filtered appropriately. Instead of table.Select(...) is there any other way? Thank You

    T 1 Reply Last reply
    0
    • D divyesh1432

      Hi all, I have a dataset which has 3 tables. They have relation by ds.Relations.Add(...) Now I want a filteration like a master table i.e. ds.tables(0) should be filtered by one column like ds.tables(0).Select("Site_ID = 5") (which will return datarow array now) and I want its children rows should be filtered appropriately. Instead of table.Select(...) is there any other way? Thank You

      T Offline
      T Offline
      Tobias Schoenig
      wrote on last edited by
      #2

      You could create a DataView-object for the DataTable via DataView dv = new DataView(ds.Tables[0]);. Then set the RowFilter with this line dv.RowFilter = "Site_ID = 5";

      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