How to tie a dropdown list to a gridview in Sharepoint 2007?

怎甘沉沦 提交于 2020-01-15 11:22:27

问题


This should be a really really simple thing, but for some reason it is just eluding me.

I want a Sharepoint page which will have a drop down list that is tied to a database lookup table.

When an item is selected and they click a GO button, I want it to update a gridview that is also on the page.

I'm looking for a simple how to - while assuming I'm a sharepoint idiot. BTW, I am using the Microsoft Office Sharepoint Designer.

Thanks,

Edit: My need is actually very simple. I want to filter the results of a query using a drop down list. This used to be called a master - detail relationship.

For example, my regular data has school name, application name, and how long the application was running. Because there could be a hundred applications per school and there are 60+ schools, I only want to show one schools information at a time.

So, I want to put a drop down list at the top of the screen which contains the list of schools. When one is selected, the gridview should be updated to reflect the new schools information.

Chris.


回答1:


I currently use a drop down tied to one sharepoint list to filter a dataview of another sharepoint List.

The instructions are here: http://blogs.msdn.com/sharepointdesigner/archive/2007/03/05/asp-net-controls-filter-the-data-view.aspx




回答2:


I'm not exactly sure of the specific needs here, but it seems that you are trying to stretch a bit beyond what Sharepoint Designer is well suited to. To look up data, you do have access via the dataview web part, which is here:

http://office.microsoft.com/en-us/sharepointdesigner/HA100948041033.aspx

However your filtering needs may prevent you from using this. If you want to do it .net without knowing too much about MOSS, you can use the "son of smartpart" (google it) which allows you to host standard .net user controls in webparts.

Hope this helps!



来源:https://stackoverflow.com/questions/177076/how-to-tie-a-dropdown-list-to-a-gridview-in-sharepoint-2007

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!