CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.web_parts_and_personalization Tags:
Item Type: NewsGroup Date Entered: 10/29/2007 3:04:48 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 20 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
Justuky
Asp.Net User
WebPartZone, GridView, ObjectDataSorce, DataList10/29/2007 3:04:48 AM

0/0

Hi all,

I'm trying to figure out how to solve this: Could not find control 'GridView3' in ControlParameter 'CourseID'.

Here is the code:

<asp:WebPartZone ID="WebPartZone3" runat="server" HeaderText=".">

<ZoneTemplate>

<asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" DataKeyNames="CourseID" DataSourceID="ObjectCoursesDataSource"

SelectedIndex="0" Title="Courses">

<Columns>

<asp:CommandField ShowSelectButton="True" />

<asp:BoundField DataField="CourseID" HeaderText="CourseID" InsertVisible="False"

ReadOnly="True" SortExpression="CourseID" />

<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />

<asp:BoundField DataField="Comments" HeaderText="Comments" SortExpression="Comments" />

</Columns>

</asp:GridView>

</ZoneTemplate>

</asp:WebPartZone>

<asp:DataList ID="DataList1" runat="server" DataKeyField="ID" DataSourceID="ObjectCourseLecturerDataSource">

<ItemTemplate>

Lecturer: </br>

<asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>' Visible="false"></asp:Label><br />

FirstName:

<asp:Label ID="FirstNameLabel" runat="server" Text='<%# Eval("FirstName") %>'></asp:Label><br />

LastName:

<asp:Label ID="LastNameLabel" runat="server" Text='<%# Eval("LastName") %>'></asp:Label><br />

<br />

</ItemTemplate>

</asp:DataList><br />

<asp:ObjectDataSource ID="ObjectCourseLecturerDataSource" runat="server" OldValuesParameterFormatString="original_{0}"

SelectMethod="GetCourseLecturerData" TypeName="CourseLecturerDataSetTableAdapters.DetailsTableAdapter">

<SelectParameters>

<asp:ControlParameter ControlID="GridView3" ConvertEmptyStringToNull="False" Name="CourseID"

PropertyName="SelectedValue" Type="Int32" />

</SelectParameters>

</asp:ObjectDataSource>

 

Please help,

Thanks,

Justuky.

Nuwanda
Asp.Net User
Re: WebPartZone, GridView, ObjectDataSorce, DataList10/29/2007 11:49:49 PM

0/0

Hi, I'm no expert...but my two cents would be that because of the transformation of the gridview control to a generic web part control, you can't see it (from objectdatasource to zonetemplate). Grouping the gridview and objectdatasource to the same user control and adding that control to the zonetemplate might do the trick.

Please do correct me with a shorter/better solution if you have one

Nai-Dong Jin -
Asp.Net User
Re: WebPartZone, GridView, ObjectDataSorce, DataList10/30/2007 7:45:28 AM

0/0

Hi,

Nuwanda is right. Since the control has been wrapped as a generic web part, you can?t access them directly.

Besides, based on your code, I can?t find any controls named ?CourseID?. Do you mean the BoundField with a ?CourseID? DataField? If so, I?m afraid it can?t be a control which can be used in ControlParameter.

Thanks.


Sincerely,
Michael Jin.
Microsoft Online Community Support

?Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?
Justuky
Asp.Net User
Re: WebPartZone, GridView, ObjectDataSorce, DataList10/30/2007 12:12:54 PM

0/0

Hi Nai-Dong Jin,

The control is the GridView3 and its parameter is the CourseID! it's not the problem though.

To clear my self: There is no problem with the code without the "WebPartZone".

Thanks,

Justuky.

4 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
WebPartZone, GridView, ObjectDataSorce, DataList - ASP.NET Forums Re: WebPartZone, GridView, ObjectDataSorce, DataList ... Re: WebPartZone, GridView, ObjectDataSorce, DataList ...
ng.asp-net-forum.web_parts_and_personalization/11 - fix error ... Swapping of controls in web parts, 6, 12, 10/30/2007 1:15:21 PM. WebPartZone, GridView, ObjectDataSorce, DataList, 3, 9, 10/30/2007 12:12:54 PM ...
Time to log somebody out - ng.asp-net-forum.security - Fix error ... webpartzone, gridview, objectdatasorce, datalist · dnn 2.0 whois registrars · club web site login works from vs 2k5 connecting to sql server 2k5, ...
@IT:Insider.NET 会議室 ディレクトリ - Visual Studio.NET/開発 ... DataListへのページング機能追加方法, 10, 2008/09/09. GridView 半角文字の折り返し ...... NET】 WebPartZoneコントロールを横方向にレイアウトできますか? ...
WebPartZone, GridView, ObjectDataSorce, DataList - ASP.NET Forums Re: WebPartZone, GridView, ObjectDataSorce, DataList ... Re: WebPartZone, GridView, ObjectDataSorce, DataList ...
ng.asp-net-forum.web_parts_and_personalization/11 - fix error ... Swapping of controls in web parts, 6, 12, 10/30/2007 1:15:21 PM. WebPartZone, GridView, ObjectDataSorce, DataList, 3, 9, 10/30/2007 12:12:54 PM ...
Time to log somebody out - ng.asp-net-forum.security - Fix error ... webpartzone, gridview, objectdatasorce, datalist · dnn 2.0 whois registrars · club web site login works from vs 2k5 connecting to sql server 2k5, ...
@IT:Insider.NET 会議室 ディレクトリ - Visual Studio.NET/開発 ... DataListへのページング機能追加方法, 10, 2008/09/09. GridView 半角文字の折り返し ...... NET】 WebPartZoneコントロールを横方向にレイアウトできますか? ...
WebPartZone, GridView, ObjectDataSorce, DataList - ASP.NET Forums Re: WebPartZone, GridView, ObjectDataSorce, DataList ... Re: WebPartZone, GridView, ObjectDataSorce, DataList ...
ng.asp-net-forum.web_parts_and_personalization/11 - fix error ... Swapping of controls in web parts, 6, 12, 10/30/2007 1:15:21 PM. WebPartZone, GridView, ObjectDataSorce, DataList, 3, 9, 10/30/2007 12:12:54 PM ...




Search This Site:










help : single user base with login redirect to child portal

need reviews from e-commerce module users

codebehind of dropdownlist in datalist

application datablocks sqlhelper.executereader

critical error with account login and announcements on home page

testing issues

launch of new classifieds site

loading module sql errors on + plus signs

smpt.send(mail) - password not secure

hosting that supports web matrix

tree view control with drag n drop using an object.

setting menu width=100%???

users online purge

type conversion error using data access application blocks

applicationname

fips 140-2 compliance

datadynamics activereports - dotnetnuke configuration error

trying to get going...

trap an event for a rendercontrol of a webcustomcontrol

dynamic textfields

solpartwebcontrols v 1.1.06

new field - sqltableprofileprovider (sandbox) ?

web parts does not show minimize/close buttons

development of a custom email module

working with hyperlink label object

theme and datagrid not working

command window

user registration question

namespace for using forms authentication

search not working, reverts back to first search

 
All Times Are GMT