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. Visual Basic
  4. Filter dataset

Filter dataset

Scheduled Pinned Locked Moved Visual Basic
tutorialannouncement
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.
  • R Offline
    R Offline
    ravihd
    wrote on last edited by
    #1

    How to filter dataset and update those filtered records Thanks

    G 1 Reply Last reply
    0
    • R ravihd

      How to filter dataset and update those filtered records Thanks

      G Offline
      G Offline
      GuruPandian
      wrote on last edited by
      #2

      Hi, We can filter the Data from DataSet as follows.. 1. Fetching Filtered Data and Filling to DataSet. ------------------------------------------------- OleDbDataAdapter1.SelectCommand.Parameters("ACNo").Value = "60891234" OleDbDataAdapter1.Fill(DataSet11) 2. Dim FilRows As DataRow() = _ Dset.Tables(0).Select("ACNo='60891234'", "ACHName", DataViewRowState.Added ) Dim r As DataRow Dim c As DataColumn For Each r In FilRows For Each c In r.Table.Columns Console.Write( "\t {0}", r(c) ) Next c Console.WriteLine() Next r Notes : ------- "ACNo='60891234'" = Condition for Fintering Data "ACHName" = Column to Sort The Data. With Regards, Pandian S

      R 1 Reply Last reply
      0
      • G GuruPandian

        Hi, We can filter the Data from DataSet as follows.. 1. Fetching Filtered Data and Filling to DataSet. ------------------------------------------------- OleDbDataAdapter1.SelectCommand.Parameters("ACNo").Value = "60891234" OleDbDataAdapter1.Fill(DataSet11) 2. Dim FilRows As DataRow() = _ Dset.Tables(0).Select("ACNo='60891234'", "ACHName", DataViewRowState.Added ) Dim r As DataRow Dim c As DataColumn For Each r In FilRows For Each c In r.Table.Columns Console.Write( "\t {0}", r(c) ) Next c Console.WriteLine() Next r Notes : ------- "ACNo='60891234'" = Condition for Fintering Data "ACHName" = Column to Sort The Data. With Regards, Pandian S

        R Offline
        R Offline
        ravihd
        wrote on last edited by
        #3

        Thanks Pandian for ur prompt reply below is my code. Actualy i wanted to modify filted dataview. can u give some suggestion on this. daConverstion.SelectCommand = scmdConversion daConverstion.Fill(dsConversion, "Duplicate") Dim MyDataView As DataView = New DataView(dsConversion.Tables("Duplicate"), "Duplicate_Group_Id=100", "Duplicate_Group_Id", DataViewRowState.CurrentRows) MyDataView.AllowEdit = True MyDataView.Item(0).Row(0) = "11"

        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