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. Doubt in Dataview filter options

Doubt in Dataview filter options

Scheduled Pinned Locked Moved ASP.NET
question
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.
  • J Offline
    J Offline
    jayarajmrj
    wrote on last edited by
    #1

    I have two dataset. Each datasets contain one table . Dataset1.Tables[0]; ---------------------------- Id Description 100 Raja 101 Jayaraj 102 Ramesh 103 Mani 104 kavitha Dataset2.Tables[0] ----------------------------- Id UpdatedWhen 100 05/06/07 104 01/09/00 How can i filter the above datasets columns by using DataView? The result should be like this Id Description 101 Jayaraj 102 Ramesh 103 Mani The result going to bind in DropDownList , like this Jayaraj Ramesh Mani Pls give the code ASAP

    J 1 Reply Last reply
    0
    • J jayarajmrj

      I have two dataset. Each datasets contain one table . Dataset1.Tables[0]; ---------------------------- Id Description 100 Raja 101 Jayaraj 102 Ramesh 103 Mani 104 kavitha Dataset2.Tables[0] ----------------------------- Id UpdatedWhen 100 05/06/07 104 01/09/00 How can i filter the above datasets columns by using DataView? The result should be like this Id Description 101 Jayaraj 102 Ramesh 103 Mani The result going to bind in DropDownList , like this Jayaraj Ramesh Mani Pls give the code ASAP

      J Offline
      J Offline
      John ph
      wrote on last edited by
      #2

      Navigate through the Dataset2.Tables[0] records and have the collection of ID in a string. write something similar to this... For Each drow In Dataset2.Tables(0).Rows Str = Str + drow("ID") + "," Next str.Remove(lstr.Length - 1, 1) To filter the records Dim dv As DataView dv = Dataset1.Tables[0].DefaultView dv.RowFilter = "ID NOT IN (" + str + ")"

      Regards
      J O H N :rose:
      "Even eagles need a push." David McNally


      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