Hi,
I am writing a "print control" routine which expects the id of a
control and will then make every element but the one that is supposed
to be printed invisible (only by using "display: none" style;
Visible=false causes a lot of collateral damage in my scenario).
I thought if I put this into "OnPreRende r" I will catch all controls
in the state they will have in the page render method, but if there
are e.g. databound controls that are being setup in the
control_prerend er method (for good reason, actually) then the
"display: none" style information may be overwritten by that method
since the page OnPreRender executes before the control's PreRender.
Is there a good time to manipulate the control tree knowing that the
alterations being made are the last ones before rendering, or a
different approach to my aim?
TIA for any hints!
Regards
DC 2 1118
On 21 Jan., 18:51, DC <d...@upsize.de wrote:
Hi,
I am writing a "print control" routine which expects the id of a
control and will then make every element but the one that is supposed
to be printed invisible (only by using "display: none" style;
Visible=false causes a lot of collateral damage in my scenario).
I thought if I put this into "OnPreRende r" I will catch all controls
in the state they will have in the page render method, but if there
are e.g. databound controls that are being setup in the
control_prerend er method (for good reason, actually) then the
"display: none" style information may be overwritten by that method
since the page OnPreRender executes before the control's PreRender.
Is there a good time to manipulate the control tree knowing that the
alterations being made are the last ones before rendering, or a
different approach to my aim?
TIA for any hints!
Regards
DC
You can hook to a number of events to accomplish this, one possiblity
is:
protected override void OnInit(EventArg s e)
{
Page.PreRenderC omplete += new EventHandler(Pa ge_PreRenderCom plete);
}
void Page_PreRenderC omplete(object sender, EventArgs e)
{
// do the style thing
}
Cheers
DC
On 31 Jan., 12:42, DC <d...@upsize.de wrote:
On 21 Jan., 18:51,DC<d...@u psize.dewrote:
Hi,
I am writing a "print control" routine which expects the id of a
control and will then make every element but the one that is supposed
to be printed invisible (only by using "display: none" style;
Visible=false causes a lot of collateral damage in my scenario).
I thought if I put this into "OnPreRende r" I will catch all controls
in the state they will have in the page render method, but if there
are e.g. databound controls that are being setup in the
control_prerend er method (for good reason, actually) then the
"display: none" style information may be overwritten by that method
since the page OnPreRender executes before the control's PreRender.
Is there a good time to manipulate the control tree knowing that the
alterations being made are the last ones before rendering, or a
different approach to my aim?
TIA for any hints!
Regards
DC
You can hook to a number of events to accomplish this, one possiblity
is:
protected override void OnInit(EventArg s e)
{
* *Page.PreRender Complete += new EventHandler(Pa ge_PreRenderCom plete);
}
void Page_PreRenderC omplete(object sender, EventArgs e)
{
* *// do the style thing
}
CheersDC- Zitierten Text ausblenden -
- Zitierten Text anzeigen -
Thank you! Just what I was looking for.
Regards
DC This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Hal Vaughan |
last post by:
I think a lot of this is definately a question of personal programming
style, but I'm new to Java and would like to hear a few opinions.
I'm writing a control panel for an application that runs separately. The
control panel is basically (almost) fully self contained. It consists of a
tabbed pane with 5 different tabs. Each tab has a number of different
controls -- basically all the "commonly used" controls (buttons, lists,
comboboxes,...
|
by: Eric Wilhelm |
last post by:
Hi,
By new-style classes, I'm referring to the changes which came into 2.2 as
a result of PEP 252 and 253. I discovered this problem when trying to
use the Perl Inline::Python module with a python class that was
inheriting from the new builting 'object' class like so:
class MyClass(object):
The problem is in detecting that this class should be treated as a class
|
by: David MacQuigg |
last post by:
I have what looks like a bug trying to generate new style classes with
a factory function.
class Animal(object): pass
class Mammal(Animal): pass
def newAnimal(bases=(Animal,), dict={}):
class C(object): pass
C.__bases__ = bases
dict = 0
|
by: Rob Nicholson |
last post by:
This is a question about the following KB article:
http://support.microsoft.com/kb/q262161
We've got a problem with the Infragistics NetAdvantage presentation controls
which they've suggested it related to this KB article.
But I'm not sure this is correct but I'd like to just confirm what this KB
article actually means. My understanding of this is that a single page can't
have more than 30 style sheets defined. It doesn't matter...
|
by: Rob Nicholson |
last post by:
We're using a well known presentation layer library to implement complex
controls on an intranet site. IE has the following limitation which
effectively means that you can only have 30 <STYLE> tags per page. That's in
effect 30 style sheets per page, not classes - each sheet can have as many
style classes as you want.
http://support.microsoft.com/default.aspx?scid=kb;en-us;262161
Unfortunately, this presentation library generates...
| |
by: Max Weebler |
last post by:
Hi,
I have a datagrid built that has an alternating item style that sets the
backcolor and ForeColor of its rows. I have 4 template columns. One of them
has a LinkButton embedded in it to perform updates. All the styles that are
set are being followed by all templated columns with the exception for the
update column. The update column does set the BackColor appropriately but
when setting its ForeColor the LinkButton's color is blue and...
|
by: stephenpas |
last post by:
We are trying to monkey-patch a third-party library that mixes new and
old-style classes with multiple inheritance. In so doing we have
uncovered some unexpected behaviour:
<quote>
class Foo:
pass
class Bar(object):
pass
|
by: raylopez99 |
last post by:
Keywords: scope resolution, passing classes between parent and child
forms, parameter constructor method, normal constructor, default
constructor, forward reference, sharing classes between forms.
Here is a newbie mistake that I found myself doing (as a newbie), and
that even a master programmer, the guru of this forum, Jon Skeet,
missed! (He knows this I'm sure, but just didn't think this was my
problem; LOL, I am needling him)
If...
|
by: Frinavale |
last post by:
So a while ago I created a Tab Strip Control (before the AjaxToolkit had theirs otherwise I would have probably just used theirs).
When I looked at the AjaxToolkit control to see how they got around this problem I discovered that they're using Animations. I don't want to bloat my control with the Ajaxtoolkit's Animation stuff though.
I guess I should tell you what the problem is.
I have a TabStrip custom control. It's a Table that has...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |