User-Control in DataList malfunctions
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngdatagridrepeaterdatalist' list.


dexter
A user-control I have written does not seem to function properly in the <EditItemTemplate> section of a DataList control. It functions fine outside of it.

I have followed the usual process of the using the @Register directive. I then add the tag as per usual, with declarative properties within the tag:

<adminnic:boolcontrol id="ext1" runat="server"
type="truefalse"
defaulttext="Joe"
value="1"
isvalid="true" />

Are there any other factors that I need to take into account in order for this control to work properly in the template of a DataList?

thanks
Reply to this message...
 
    
Yannick Smits
What do you mean by: "does not seem to function properly"?

Yannick Smits

================
"dexter" <Click here to reveal e-mail address> wrote in message
news:694867@aspngdatagridrepeaterdatalist...
A user-control I have written does not seem to function properly in the
<EditItemTemplate> section of a DataList control. It functions fine outside
of it.

I have followed the usual process of the using the @Register directive. I
then add the tag as per usual, with declarative properties within the tag:

<adminnic:boolcontrol id="ext1" runat="server"
type="truefalse"
defaulttext="Joe"
value="1"
isvalid="true" />

Are there any other factors that I need to take into account in order for
this control to work properly in the template of a DataList?

thanks

Reply to this message...
 
    
dexter

Sorry about the vagueness.

The user controls are include a dropdowlist control and a validator control.
On rendering in the edit (in the <EditItemTemplate>) state in the datalist,
the user control displays the dropdownlist however it is empty, with none of
the list items. So none of its inherent logic which binds the dropdown to
data (a hashtable in this case) is working.

In design view of the datalist, the usercontrols are displaying normally.

Do I need to programmatically load these controls and add them to the
container DataList control. If so how do I do that, and how do I ensure they
fire only in the <EditItemTemplate> programmatically.

What other method should I use to load the control?

thanks

"Yannick Smits" <Click here to reveal e-mail address> wrote in message
news:695113@aspngdatagridrepeaterdatalist...
[Original message clipped]

Reply to this message...
 
 
System.Web.UI.WebControls.DataList




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com