473,396 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CustomControl Losing Events.


HI all,
I have been battling with this problem with some time now, now iam out
of ideas what to do
basically iam planning a tab control in which page developers can define
tab abd tabelements on the page, and i can render a table with one row
being link buttons and second row with tabelements..

tha markup of the control looks like

<uc:TabStrip ID="tbMatrixProduct" runat="server">
<uc:TabElement ID="teGeneral" runat="server" Description="General">
<uc:GeneralProduct ID="GeneralProduct1" runat="server" />
</uc:TabElement>
<uc:TabElement ID="teDescription" runat="server"
Description="Description">
<uc:ProductDescription ID="ProductDescription1" runat="server" />
</uc:TabElement>
</uc:TabStrip>

i have two controls with tabcontrol having ParseChildren Attribute, and
having a ControlBuilder defined for TabElement.

The RenderChildControl method looks like
protected override void CreateChildControls()
{

Controls.Clear();
Table cTable = new Table();
cTable.ID = "tbl" + this.ID;

cTable.Rows.Add(new TableRow());
//create link button row and add a link button for each tab
double width = Math.Floor((double)100 / (Elements.Count+1));

foreach(TabElement element in mElements)
{
//create link buttons here
}

TableCell panelcell = new TableCell();
panelcell.ColumnSpan = mElements.Count +1 ;
panelcell.Width = new Unit( "100%");

// create tabelements controls here
foreach (TabElement element in mElements)
{
Panel holder = new Panel();
holder.ID = "pnl" + element.ID;
holder.Controls.Add(element);
holder.Visible = (VisibleTabId == element.ID);
panelcell.Controls.Add(holder);
}
so far so good, everything comes up just fine, but one of the
usercontrols in tabelements is having nested datalist..., thats where
thr trouble begins...

the child datalist is having link buttons, and their event handlers
never get called ...

I can put the user control on the page and it works fine, but when i put
it on my TabControl, it stops firing events...

I have tried wiring up events on the markup, in the code behind
everywhere, but the events dont get called.
I can confirm that the usercontrol is not loading the entire datalists
on the post back, but i dont know why, and how can i make it..., i can
post the whole code if someone is interested in looking at the problem...

thanks
May 22 '06 #1
0 1080

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: DapperDanH | last post by:
Hello, I am having a problem using Form.ShowDialog in C# (2003). I display a form with ShowDialog and then close it, then re-display with ShowDialog again. Note that I am not re-instantiating...
1
by: Eric B | last post by:
Hi, I've made a serverside component that automatically adds a validator. Currently i have both a REQUIRED validator and a CUSTOM validator in it. The customValidator has a javascript function...
2
by: Kevin Waite | last post by:
On many occasions (but without an obvious pattern), we (it's not just me!) encounter a problem with VS.Net losing event handlers for controls, e.g. the auto-generated this.button.click += new...
2
by: philipp | last post by:
Hi I want to write a customControl, which shows a login-component containing textboxes for the username and password and a login-button. As soon as a user logs in, the textboxes and the button...
2
by: Steve | last post by:
Hi, I have a dynamically created ImageButton in a custom control, and I can't get the control to handle the ImageButton Click event. I see the control in the Page.Request.Form.AllKeys collection,...
2
by: Gman | last post by:
Hi, I have created a usercontrol, a grid control essentially. Within it I have a class: clsGridRecord. I have coded the events such that when a user clicks on the grid, say, the events occur on...
1
by: Israel | last post by:
The problem: I want to know, definitively when a slider loses focus after a user has started sliding and hasn't released the mouse yet. It appears that this is captured with the WM_ACTIVATEAPP...
1
by: Sagaert Johan | last post by:
Hi How can i add an icon to my customcontrol so it appears in the toolbox ? How is this done in VS2005 ?
0
by: Angrez Singh | last post by:
Hi, I am trying to use a "customcontrol" inside a "webusercontrol" but facing problem with the viewstate of the "customcontrol". When I use the "customcontrol" on a page either adding it...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.