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. Need Help. filtering a SQLDataAdapter with a girdview selected.value [modified]

Need Help. filtering a SQLDataAdapter with a girdview selected.value [modified]

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

    i have a grid view with bind to a sqlDatasource and I have a repeater that i want populate, according with the selected item in the grid view. and the data comes from a relational tables. here is the grid view and and the sqldataadapter, I know i am doing something wrong, but i dont know what it is, help please asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="EventId" DataSourceID="SqlDataSource1" SelectedIndex="1"> and here is the the sqldataadpter Sub BindData() 'Read sample item info from XML document into a DataSet Dim cnn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("vpx_newConnectionString").ToString) cnn.Open() Dim cmd As SqlDataAdapter = New SqlDataAdapter("select * from mediaphotos Where EventID =" & GridView1.SelectedValue, cnn) Dim ds As New DataSet() cmd.Fill(ds) -- modified at 10:13 Monday 17th September, 2007

    M 1 Reply Last reply
    0
    • O orsini

      i have a grid view with bind to a sqlDatasource and I have a repeater that i want populate, according with the selected item in the grid view. and the data comes from a relational tables. here is the grid view and and the sqldataadapter, I know i am doing something wrong, but i dont know what it is, help please asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="EventId" DataSourceID="SqlDataSource1" SelectedIndex="1"> and here is the the sqldataadpter Sub BindData() 'Read sample item info from XML document into a DataSet Dim cnn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("vpx_newConnectionString").ToString) cnn.Open() Dim cmd As SqlDataAdapter = New SqlDataAdapter("select * from mediaphotos Where EventID =" & GridView1.SelectedValue, cnn) Dim ds As New DataSet() cmd.Fill(ds) -- modified at 10:13 Monday 17th September, 2007

      M Offline
      M Offline
      monu nair
      wrote on last edited by
      #2

      I think u want to filter your data in GridView. so for that u have to use DataView concept . u can use dataview.filter=Expression. MBMB

      O 1 Reply Last reply
      0
      • M monu nair

        I think u want to filter your data in GridView. so for that u have to use DataView concept . u can use dataview.filter=Expression. MBMB

        O Offline
        O Offline
        orsini
        wrote on last edited by
        #3

        Thank for answering, i might be do that, thanks

        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