473,399 Members | 3,888 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,399 software developers and data experts.

Usercontrols not being VISUALLY updated

I have some user controls that are inside a formview control. I use the
usercontrols in the EditItemTemplate, ItemTemplate and the
InsertItemTemplate of the formview. In a 3 templates the user controls have
the exact same name (uc1, uc2, uc3).

In my formview_modechanging even I am trying to autopopulate the user
controls, if data exists. I debug the code and I can see the before and
after results of the text fields changing etc... in each user control. It
seems to work fine.

But, when the code finishes and the form is shown they are still
untouched/empty.

Any ideas what could be wrong?

Thanks.
Jun 27 '08 #1
4 995
What happens if you manually set a text field on one of the controls in the
page's pre-render event. Does the change get reflected ?

If not, does it get reflected if you do the same for the user control ?

Take some basic steps to see where this is falling down.


"Cirene" <ci****@nowhere.comwrote in message
news:e4**************@TK2MSFTNGP03.phx.gbl...
>I have some user controls that are inside a formview control. I use the
usercontrols in the EditItemTemplate, ItemTemplate and the
InsertItemTemplate of the formview. In a 3 templates the user controls
have the exact same name (uc1, uc2, uc3).

In my formview_modechanging even I am trying to autopopulate the user
controls, if data exists. I debug the code and I can see the before and
after results of the text fields changing etc... in each user control. It
seems to work fine.

But, when the code finishes and the form is shown they are still
untouched/empty.

Any ideas what could be wrong?

Thanks.

Jun 27 '08 #2
In the Page_Prerender I cannot yet refer to the user control, which is
located within the formview.

Maybe because the formview is based on the gridview's selected data????

"Rain" <me@myplace.comwrote in message
news:Om**************@TK2MSFTNGP05.phx.gbl...
What happens if you manually set a text field on one of the controls in
the page's pre-render event. Does the change get reflected ?

If not, does it get reflected if you do the same for the user control ?

Take some basic steps to see where this is falling down.


"Cirene" <ci****@nowhere.comwrote in message
news:e4**************@TK2MSFTNGP03.phx.gbl...
>>I have some user controls that are inside a formview control. I use the
usercontrols in the EditItemTemplate, ItemTemplate and the
InsertItemTemplate of the formview. In a 3 templates the user controls
have the exact same name (uc1, uc2, uc3).

In my formview_modechanging even I am trying to autopopulate the user
controls, if data exists. I debug the code and I can see the before and
after results of the text fields changing etc... in each user control.
It seems to work fine.

But, when the code finishes and the form is shown they are still
untouched/empty.

Any ideas what could be wrong?

Thanks.


Jun 27 '08 #3
If I do this...

CType(FormView1.FindControl("ucToMon"), common_ucTimeSelect).GetWholeTime

I DO see that the control should have a time of "2:02 PM". But visually it
does not.

Is this because the usercontrols have the same name in the various
templates?

"Rain" <me@myplace.comwrote in message
news:Om**************@TK2MSFTNGP05.phx.gbl...
What happens if you manually set a text field on one of the controls in
the page's pre-render event. Does the change get reflected ?

If not, does it get reflected if you do the same for the user control ?

Take some basic steps to see where this is falling down.


"Cirene" <ci****@nowhere.comwrote in message
news:e4**************@TK2MSFTNGP03.phx.gbl...
>>I have some user controls that are inside a formview control. I use the
usercontrols in the EditItemTemplate, ItemTemplate and the
InsertItemTemplate of the formview. In a 3 templates the user controls
have the exact same name (uc1, uc2, uc3).

In my formview_modechanging even I am trying to autopopulate the user
controls, if data exists. I debug the code and I can see the before and
after results of the text fields changing etc... in each user control.
It seems to work fine.

But, when the code finishes and the form is shown they are still
untouched/empty.

Any ideas what could be wrong?

Thanks.


Jun 27 '08 #4
Oh by the way, all these controls are within a MASTER page. I wonder if
that matters...

"Cirene" <ci****@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
If I do this...

CType(FormView1.FindControl("ucToMon"), common_ucTimeSelect).GetWholeTime

I DO see that the control should have a time of "2:02 PM". But visually
it does not.

Is this because the usercontrols have the same name in the various
templates?

"Rain" <me@myplace.comwrote in message
news:Om**************@TK2MSFTNGP05.phx.gbl...
>What happens if you manually set a text field on one of the controls in
the page's pre-render event. Does the change get reflected ?

If not, does it get reflected if you do the same for the user control ?

Take some basic steps to see where this is falling down.


"Cirene" <ci****@nowhere.comwrote in message
news:e4**************@TK2MSFTNGP03.phx.gbl...
>>>I have some user controls that are inside a formview control. I use the
usercontrols in the EditItemTemplate, ItemTemplate and the
InsertItemTemplate of the formview. In a 3 templates the user controls
have the exact same name (uc1, uc2, uc3).

In my formview_modechanging even I am trying to autopopulate the user
controls, if data exists. I debug the code and I can see the before and
after results of the text fields changing etc... in each user control.
It seems to work fine.

But, when the code finishes and the form is shown they are still
untouched/empty.

Any ideas what could be wrong?

Thanks.



Jun 27 '08 #5

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

Similar topics

2
by: Emma | last post by:
Hi, I'm developing a GUI with almost all Usercontrols. It's been working wonderfull up till a few weeks ago, and really crashed yesterday. Suddenly I can no longer add some of my usercontrols...
4
by: Anders K. Jacobsen [DK] | last post by:
Hi I have some common UserControls i want to share between to sites (on the same mashine but on diffrent virtual paths). right now i have on solution file with aprox 10 projects. 2 of these is...
2
by: Charles Law | last post by:
I want a set of controls that all have a border, like a group box. I thought I would create a base control containing just a group box from which my set of controls could inherit. Assuming that...
3
by: YYZ | last post by:
I swear I've done my research, and now I was just hoping someone could explain this to me. I've got a base class (usercontrol) that I am using just as an interface. Meaning, I've defined...
5
by: David Lozzi | last post by:
Hello, I have an interesting issue, so bear with me as I try to explain. I have a datalist posing as tabs for my application. And as each tab is clicked, a placeholder is then populated with the...
0
by: seigo | last post by:
Hello, I faced with the following problem. I have a PlaceHolder on a page and a few UserControls which have custom events, for instance: public delegate void SelectHandler(object sender,...
4
by: Nathan Sokalski | last post by:
In several of my UserControls I add properties. If I access these properties in the CodeBehind of the pages that use the controls, I recieve an error when compiling. The reason for this is because...
7
by: Nathan Sokalski | last post by:
I have a page which I dynamically add several usercontrols (*.ascx files) to using the following code: Public Sub Refresh() For Each section As DataRow In Me.GetSections().Rows...
1
by: m.bagattini | last post by:
Hello folks, I'm in trouble with an application using methodologies in subject. The idea is to have a single-page application. The host aspx page coordinates all visualizations, loading and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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.