I have tab control with several tab pages. Each tab page contains a few
textboxes filled dynamicly from the code. Everything goes fine, but every
textbox that is located on a tab page that has hot been selected after the
form has been activates has no text! Let me try to describe my problem
further:
TAB CONTROL
PAGE PAGE PAGE PAGE
------------------------------------
TXT1 TXT3 TXT5 TXT7
TXT2 TXT4 TXT6 TXT8
------------------------------------
BUTTON(CLOSE)
On form load goes:
TXT1.Text = "my";
TXT2.Text = "form";
TXT3.Text = "isnt";
TXT4.Text = "working";
TXT5.Text = "right";
//etc...
By default, when form openes, the first tab page is focused, and other have
never been focused. When I close this dialog, and set a breakpoint, i get
this odd results:
Button_Close_Cl ick (...)
{
Debug.WriteLine (TXT1.Text);
Debug.WriteLine (TXT1.Text);
} 4 2519
Sorry, last post was somehow ruined, and posted unfinished... here's the
whole post:
------------------------
I have tab control with several tab pages. Each tab page contains a few
textboxes filled dynamicly from the code. Everything goes fine, but every
textbox that is located on a tab page that has hot been selected after the
form has been activates has no text! Let me try to describe my problem
further:
TAB CONTROL
PAGE PAGE PAGE PAGE
------------------------------------
TXT1 TXT3 TXT5 TXT7
TXT2 TXT4 TXT6 TXT8
------------------------------------
BUTTON(CLOSE)
On form load goes:
TXT1.Text = "my";
TXT2.Text = "form";
TXT3.Text = "isnt";
TXT4.Text = "working";
TXT5.Text = "right";
//etc...
Exactly, textboxes are binded to a strong-typed dataset, but that isnt a
problem...
By default, when form openes, the first tab page is focused, and other have
never been focused. When I close this dialog, and set a breakpoint, i get
this odd results:
Button_Close_Cl ick (...)
{
Debug.WriteLine (TXT1.Text); // writes "my" - ok.
Debug.WriteLine (TXT2.Text); // writes "form" - ok
Debug.WriteLine (TXT3.Text); // writes "" - ????
Debug.WriteLine (TXT4.Text); // writes "" - ????
Debug.WriteLine (TXT5.Text); // writes "" - ????
Debug.WriteLine (TXT6.Text); // writes "" - ????
// every control that has been on some tab
// page that was never focused, has no text set!
// WHY?!
}
Sorry for my bad english, i hope you understood me!
Thank you for replies!
Have you tried setting the bindingcontext of each tabpage at form load.
\\\
foreach(TabPage tp in this.tabControl 1.TabPages)
{
tp.BindingConte xt = this.BindingCon text;
}
///
This problem only occurs on DataBound controls and is not specific to
TabControls. You will see this behaviour on any control whose visibility
changes (when a tabpage is not selected it is not visible).
--
Mick Doherty http://dotnetrix.co.uk/nothing.html
"Jeti [work]" <je**@programer i.org> wrote in message
news:eP******** ******@TK2MSFTN GP14.phx.gbl... Sorry, last post was somehow ruined, and posted unfinished... here's the whole post: ------------------------
I have tab control with several tab pages. Each tab page contains a few textboxes filled dynamicly from the code. Everything goes fine, but every textbox that is located on a tab page that has hot been selected after the form has been activates has no text! Let me try to describe my problem further:
TAB CONTROL PAGE PAGE PAGE PAGE ------------------------------------ TXT1 TXT3 TXT5 TXT7 TXT2 TXT4 TXT6 TXT8 ------------------------------------
BUTTON(CLOSE)
On form load goes: TXT1.Text = "my"; TXT2.Text = "form"; TXT3.Text = "isnt"; TXT4.Text = "working"; TXT5.Text = "right"; //etc... Exactly, textboxes are binded to a strong-typed dataset, but that isnt a problem...
By default, when form openes, the first tab page is focused, and other have never been focused. When I close this dialog, and set a breakpoint, i get this odd results:
Button_Close_Cl ick (...) { Debug.WriteLine (TXT1.Text); // writes "my" - ok. Debug.WriteLine (TXT2.Text); // writes "form" - ok Debug.WriteLine (TXT3.Text); // writes "" - ???? Debug.WriteLine (TXT4.Text); // writes "" - ???? Debug.WriteLine (TXT5.Text); // writes "" - ???? Debug.WriteLine (TXT6.Text); // writes "" - ???? // every control that has been on some tab // page that was never focused, has no text set! // WHY?! } Sorry for my bad english, i hope you understood me! Thank you for replies!
> Have you tried setting the bindingcontext of each tabpage at form load. \\\ foreach(TabPage tp in this.tabControl 1.TabPages) { tp.BindingConte xt = this.BindingCon text; } ///
This problem only occurs on DataBound controls and is not specific to TabControls. You will see this behaviour on any control whose visibility changes (when a tabpage is not selected it is not visible).
I've just tried this, and it does not help... Anyway, thank you for the
reply...
Anyone else has any solutions?
I don't really use databinding so I've never had the need to analyze it, but
I did follow the instructions in Q327896 to reproduce the bug with a
CheckedListBox on a TabPage. http://support.microsoft.com/d*efaul...;en-us;3278*96
The solution I offered did resolve this issue, so I thought it was worth a
mention, but maybe the article will help.
--
Mick Doherty http://dotnetrix.co.uk/nothing.html
"Jeti [work]" <je**@programer i.org> wrote in message
news:eg******** *****@TK2MSFTNG P15.phx.gbl... Have you tried setting the bindingcontext of each tabpage at form load.
\\\ foreach(TabPage tp in this.tabControl 1.TabPages) { tp.BindingConte xt = this.BindingCon text; } ///
This problem only occurs on DataBound controls and is not specific to TabControls. You will see this behaviour on any control whose visibility changes (when a tabpage is not selected it is not visible).
I've just tried this, and it does not help... Anyway, thank you for the reply... Anyone else has any solutions?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sagaert Johan |
last post by:
I have made a custom control that draws a rectangle when the mouse is down, and does nothing when the mouse is up.
I set/reset a flag in MouseDown/Mouse up and use this to do the drawing in the OnPaint .
The recangle draws correct when i press the mouse, but when i release the mouse the background is not restored
What should i do in the Onpaint to make sure the background (the form) is restored correctly ?
This problem already keeps...
|
by: Brian W |
last post by:
Yet another editor problem
To reproduce do the following
1) Open a Webform and switch to HTML edit mode
2) Enter the Following (include spaces)
This is some text before <asp:hyperlink id="hl1" runat="server "
navigateurl="http://www.microsoft.com">This is my link</asp:hyperlink> And
this is my text after the Hyperlink
|
by: Eric |
last post by:
I have built a composite user web control that I want to create dynamically.
The form will contain a variable number of these controls and as well some
of the contents of the user web control itself are dynamically created
controls.
I create as follows:
wcGroupControl oGroupControl = new wcGroupControl();
I then tried calling methods of the control passing dynamic controls as
parameters that need to be added to the web controls on the...
|
by: Brian |
last post by:
NOTE ALSO POSTED IN
microsoft.public.dotnet.framework.aspnet.buildingcontrols
I have solved most of my Server Control Collection property issues.
I wrote an HTML page that describes all of the problems that I have
encountered to date and the solutions (if any) that I found.
http://users.adelphia.net/~brianpclab/ServerControlCollectionIssues.htm
This page also has all of the source code in a compressed file that you are
free to download...
|
by: Shimon Sim |
last post by:
I have a custom composite control
I have following property
| |
by: Chuck Hartman |
last post by:
I have a Windows service that requests web pages from a site using an
HttpWebRequest object. When I try to request a page from an ASP.NET 2 site,
I get a WebException with message "The remote server returned an error:
(500) Internal Server Error." I found a post that suggested to catch the
WebException to retrieve the actual HttpWebResponse object for more
information. The response returned is shown below.
At first I thought this was a...
|
by: Segfahlt |
last post by:
I need a little help here please.
I have 2 win forms user controls in 2 different projects that I'm hosting in
2 different virtual directories. The controls have been test and operate okay
in both projects.
Both controls(dlls) have been signed using SN.exe and I've set up the
appropriate .Net assembly permissions using those Strong Names
The DLL's have been copied to the /bin directory in both web virtual
directories.
|
by: Tony Johansson |
last post by:
Hello!
I have one solution file that consist of three project.
One project that build the exe file called A
One project that build a user control dll. Here we have a class called B
One project that build a class library dll. Here we have a class called C
We have one dependency and that is from the user control to the class
library because
in the constructor for class B in the user control we have a call to
|
by: tony |
last post by:
Hello!
This is a rather long mail but it's a very interesting one.
I hope you read it. I have tried several times to get an answer to this mail
but I have
not get any answer saying something like this is a bug or that .NET doesn't
support what I
trying to do.
I hope that one that is is microsoft certified read this because this must
be a bug.
|
by: rizwanahmed24 |
last post by:
Hello
i have made a custom control. i have placed a panel on it. I want this
panel to behave just like the normal panel. The problem i was having is
that the panel on my custom control doesnt accept other controls. The
control i drag drop on it becomes the child of my custom control's
parent form and not the child of my custom control. Then i added this
line
""
before my custom control class (i dont know what this line does). Now
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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: 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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |