如何将下拉列表绑定到Sharepoint 2007中的gridview?

时间:2021-01-26 10:48:35

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.

我想要一个Sharepoint页面,它将有一个与数据库查找表绑定的下拉列表。

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

当选择一个项目并单击一个GO按钮时,我希望它更新同样位于页面上的网格视图。

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

我正在寻找一个简单的方法 - 虽然假设我是一个共享点白痴。顺便说一下,我正在使用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.

例如,我的常规数据包含学校名称,应用程序名称以及应用程序运行的时间。因为每所学校可能有一百个申请,而且有60多所学校,我只想一次显示一所学校的信息。

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.

所以,我想在屏幕顶部放一个下拉列表,其中包含学校列表。选择一个时,应更新gridview以反映新的学校信息。

Chris.

2 个解决方案

#1


2  

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

说明如下:http://blogs.msdn.com/sharepointdesigner/archive/2007/03/05/asp-net-controls-filter-the-data-view.aspx

#2


1  

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:

我不完全确定这里的具体需求,但似乎你试图延伸到Sharepoint Designer非常适合的范围。要查找数据,您可以通过dataview Web部件进行访问,该部分位于:

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.

但是,您的过滤需求可能会阻止您使用它。如果你想在没有太多了解MOSS的情况下去做.net,你可以使用“smartpart之子”(google it),它允许你在webparts中托管标准的.net用户控件。

Hope this helps!

希望这可以帮助!

#1


2  

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

说明如下:http://blogs.msdn.com/sharepointdesigner/archive/2007/03/05/asp-net-controls-filter-the-data-view.aspx

#2


1  

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:

我不完全确定这里的具体需求,但似乎你试图延伸到Sharepoint Designer非常适合的范围。要查找数据,您可以通过dataview Web部件进行访问,该部分位于:

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.

但是,您的过滤需求可能会阻止您使用它。如果你想在没有太多了解MOSS的情况下去做.net,你可以使用“smartpart之子”(google it),它允许你在webparts中托管标准的.net用户控件。

Hope this helps!

希望这可以帮助!