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. DropDown Search

DropDown Search

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

    Hi, I have 3 tables: table1, table2 and table3. Table 1 (table1ID, Name1) Table 2 (table2ID, table1ID, Name2) Table 3 (table3ID, table2ID, Name3) I have 2 DropDownLists: ddltable1SEARCH and ddltable2SEARCH. They are both databound with the fields table1.Name1 and table2.Name2 respectively. I also have a Datagrid: table3grid. It is databound with the field table3.Name3. NOTE: Please keep in mind the table relationships. My point is: I CANNOT directly perform a search using the first dropdown. DropDown2 relies on DropDown1. When DropDown1 changes, DropDown2 changes to display available entries. THEN, the search is directly done by using DropDown2 for the Datagrid. I have already created the view for the tables. Therefore, I would like to know which of the following VB statements is syntatically correct when I am passing the search values from the DropDowns to a SubRoutine: obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue) OR obj.SearchSubRoutine(Me.ddltable1SEARCH.SelectedValue **And** Me.ddltable2SEARCH.SelectedValue)

    R 1 Reply Last reply
    0
    • D Dayekh

      Hi, I have 3 tables: table1, table2 and table3. Table 1 (table1ID, Name1) Table 2 (table2ID, table1ID, Name2) Table 3 (table3ID, table2ID, Name3) I have 2 DropDownLists: ddltable1SEARCH and ddltable2SEARCH. They are both databound with the fields table1.Name1 and table2.Name2 respectively. I also have a Datagrid: table3grid. It is databound with the field table3.Name3. NOTE: Please keep in mind the table relationships. My point is: I CANNOT directly perform a search using the first dropdown. DropDown2 relies on DropDown1. When DropDown1 changes, DropDown2 changes to display available entries. THEN, the search is directly done by using DropDown2 for the Datagrid. I have already created the view for the tables. Therefore, I would like to know which of the following VB statements is syntatically correct when I am passing the search values from the DropDowns to a SubRoutine: obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue) OR obj.SearchSubRoutine(Me.ddltable1SEARCH.SelectedValue **And** Me.ddltable2SEARCH.SelectedValue)

      R Offline
      R Offline
      ravie gopal
      wrote on last edited by
      #2

      As per the Table Relationships, Table3 refers only Table2 and Table2 refers Table1. And you are refreshing the ddltable2SEARCH list whenever ddltable1SEARCH selection changes. So, you don't need to consider both dropdown values to fill the datagrid. I would prefer : obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue)

      Ravi Gopal.

      D 1 Reply Last reply
      0
      • R ravie gopal

        As per the Table Relationships, Table3 refers only Table2 and Table2 refers Table1. And you are refreshing the ddltable2SEARCH list whenever ddltable1SEARCH selection changes. So, you don't need to consider both dropdown values to fill the datagrid. I would prefer : obj.SearchSubRoutine(Me.ddltable2SEARCH.SelectedValue)

        Ravi Gopal.

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

        Thanks for the reply, I will try to see if I can make that work. Have been trying for a while with no effect. Cheers.

        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