I am using a textbox with a gridview to display data. I have a new requirement to display one textbox gridview based on what a user selects from another. I am at a loss how I could accomplish this. I've tried things I found online but I still can't get it to work. How can I tell room to populate based on what building is selected.

Here are my two views:
vBldgs
bldg_id
lookup
item
isDefault
isInactive

vRooms
room_id
lookup
item
bldg_id
isDefault
isInactive

Each control is calling a separate view to populate
text with gridview (building)
select * from vBldgs where lookup='bldg' order by item
text with gridview (room)
select item from vRooms where lookup='room' order by item

Hi,

Keep a Public Project Level Variable To Populate Building Selected in first Form. And While Loading Second Form Filter Records for only the Selected Parameter using "Where" Condition in the SQL Statement.

-Vee

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.