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. basic search using user control

basic search using user control

Scheduled Pinned Locked Moved C#
helpcssalgorithms
6 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
    dsaikrishna
    wrote on last edited by
    #1

    Dear all, i am facing a problem in searching by using a user control with three conditons they are Selecting the criteria, Selecting the State, Selecting the City in each and every page i want to place the user control. i want to search the criteria based upon the state and city and display the content in a grid. please help me in this regard Thanks and Regards

    sai krishna

    L 1 Reply Last reply
    0
    • D dsaikrishna

      Dear all, i am facing a problem in searching by using a user control with three conditons they are Selecting the criteria, Selecting the State, Selecting the City in each and every page i want to place the user control. i want to search the criteria based upon the state and city and display the content in a grid. please help me in this regard Thanks and Regards

      sai krishna

      L Offline
      L Offline
      laddie 0
      wrote on last edited by
      #2

      Hi sai, Please post more details of your issue. What is the issue u r facing any error messages and above all what exactly you are trying to do. Thank you Laddie

      D 1 Reply Last reply
      0
      • L laddie 0

        Hi sai, Please post more details of your issue. What is the issue u r facing any error messages and above all what exactly you are trying to do. Thank you Laddie

        D Offline
        D Offline
        dsaikrishna
        wrote on last edited by
        #3

        Hi Laddie, My problem is i am having two dropdownlists of selecting the criteria ,select a state and the other one is city. if i select the criteria like video and state like Newjersey it should display the videos belong to Newyork State and if i enter the city also then search should based upon all the conditions. Hope u understand if any misspelt please send me reply thanks and regards

        sai krishna

        L 1 Reply Last reply
        0
        • D dsaikrishna

          Hi Laddie, My problem is i am having two dropdownlists of selecting the criteria ,select a state and the other one is city. if i select the criteria like video and state like Newjersey it should display the videos belong to Newyork State and if i enter the city also then search should based upon all the conditions. Hope u understand if any misspelt please send me reply thanks and regards

          sai krishna

          L Offline
          L Offline
          laddie 0
          wrote on last edited by
          #4

          Let us start from the assumption that the data which need to be filtered is there in a data table named myDataTable. Now DataView dataView = new DataView(myDataTable); dataView.RowFilter = "Type ="+DropDownList1.SelectedText+" City="+DropDownLlist2.SelectedText; DataGridView1.DataSource = dataView; DataGridView1.DataBind(); Let me know if it helps. Laddie

          L D 2 Replies Last reply
          0
          • L laddie 0

            Let us start from the assumption that the data which need to be filtered is there in a data table named myDataTable. Now DataView dataView = new DataView(myDataTable); dataView.RowFilter = "Type ="+DropDownList1.SelectedText+" City="+DropDownLlist2.SelectedText; DataGridView1.DataSource = dataView; DataGridView1.DataBind(); Let me know if it helps. Laddie

            L Offline
            L Offline
            laddie 0
            wrote on last edited by
            #5

            An ofcouse twist the rowfilter logic to suit your needs

            1 Reply Last reply
            0
            • L laddie 0

              Let us start from the assumption that the data which need to be filtered is there in a data table named myDataTable. Now DataView dataView = new DataView(myDataTable); dataView.RowFilter = "Type ="+DropDownList1.SelectedText+" City="+DropDownLlist2.SelectedText; DataGridView1.DataSource = dataView; DataGridView1.DataBind(); Let me know if it helps. Laddie

              D Offline
              D Offline
              dsaikrishna
              wrote on last edited by
              #6

              Thanks laddie, For ur concern. but i am fetching the data from database not using any datatable i am simply fetching the count of the state avialable or not is it right procedure or not. or else i can explain it more breifly like criteria - dropdownlist state - dropdownlist city - text i'll select criteria first and then state, if i want to know city wise then i enter city. these are the conditions so please help me thanks and regards

              sai krishna

              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