Hi,
I have a 3rd party radio group control rg1, with a yes and a no field in it.
Then there are 2 textbox controls after that. t1 and t2
now on the focus leave event of the rg1 i want to set t1 to disbaled, and t2 enabled if rg1.selectedIndex = 0 (ie yes) and vice versa if 1;
But what happens is that, if rg1.selectedIndex is 0 then on tab event the focus is on t1 but t1 is disabled, so the user has to tab again to move to t2.
I cant use valuChanged or valuChanging event due to the nature of the windows form.
Any help is appreciated.
Thanks
5 1250
Hi,
I have a 3rd party radio group control rg1, with a yes and a no field in it.
Then there are 2 textbox controls after that. t1 and t2
now on the focus leave event of the rg1 i want to set t1 to disbaled, and t2 enabled if rg1.selectedIndex = 0 (ie yes) and vice versa if 1;
But what happens is that, if rg1.selectedIndex is 0 then on tab event the focus is on t1 but t1 is disabled, so the user has to tab again to move to t2.
I cant use valuChanged or valuChanging event due to the nature of the windows form.
Any help is appreciated.
Thanks
in the leave event u can try this: -
-
if (rg1.selectedIndex = 0) {
-
t2.focus();
-
}
-
hope i got ur requirement right...
enjoy coding
in the leave event u can try this: -
-
if (rg1.selectedIndex = 0) {
-
t2.focus();
-
}
-
hope i got ur requirement right...
enjoy coding
I did that....but my form has a lot other controls, so I want the user to be able to tab back to the previous controls. If i use the leve even to focus on t1 or t2, then the user cannot use the keyboard to go back.....not a possible scenariio in this case
A correctly disabled control is not able to receive a tab-focus.
If your control is still getting focused, it is not actually disabled.
A correctly disabled control is not able to receive a tab-focus.
If your control is still getting focused, it is not actually disabled.
Hi Plater...I thought of the same...
So what i did was i got the ActiveControl as soon as i left focus of my control and did the enabling and disabling...what i did then is to print the name and the text of the active controll...
surprisingly, it gave me the correct controls..but only the text in it. It was not able to get the name of the control.
Very frsutrating that im so close but its not working.
I think i'll make the editValueChangedEvent work on this one, to avoid the UI requirements.
(Sometimes its so weird that the functionality of what the program does is overlooked for the UI)
Well , this time i chaned it to what i was fearing to do so, i put the code into the editValueChanging event.
This time...everything went as normal....but!!!!
im using bindingSource and datatables
The structure of the form -> i have a list of items that can edited (you can also add new items) on the left side of the form (just displaying item numbers 1,2,3,4....n)
When im in adding a new item, everything is good, but when i start clicking diffrent items, the radiogroup control goes whacky, and starts to load its value from the previous row, and if i select to save, it saves it for that specific item...
No clue why it behaves so weird
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Mark Hannon |
last post by:
I have been researching the "disabled" property for form data and
wanted to know:
- Does the disabled property supress the form item from being submitted?
- Can the disabled property be applied...
|
by: Kelly Domalik |
last post by:
I would like to override the "disabled" property of a hidden field. When
disabled is set to "true", it would call a function to disable 2 other text
fields on the form. When disabled is set to...
|
by: |
last post by:
Please, help.
I created my contol, ButtonX, which subclasses System.Forms.Windows.Button
class. I am doing my own paiting, by overriding OnPaint and
OnPaintBackground (without calling base...
|
by: Rachel Suddeth |
last post by:
I didn't know what to put for a subject, so I just tell you a problem
requirement they want for my ap. If the user hovers over a disabled control,
they want a text bubble to explain why it's...
|
by: Steve Le Monnier |
last post by:
When you make a textbox control disabled ( txtText1.Enabled = false; )
You're left with grey text on a greyer background, which is not ideal. The
Read-Only property is no use to me as I need to...
|
by: Stu Carter |
last post by:
Hi,
I have an aspx page where some controls are initially disabled by the
code-behind 'Page_Load' event. I want these controls to be dynamically
enabled when the user checks a checkbox. ...
|
by: garyusenet |
last post by:
I'm using krypton toolkit which has allowed me to make a cool looking
form. However, when I set my textbox to disabled it is 'greyed' out.
The grey colour isn't in keeping with the office 2007...
|
by: SergioQ |
last post by:
Perhaps I am reading it wrong, but I assumed that the line below would
cause the value of 1 to be sent to the form. Instead it's sending a
0.
<input type="checkbox" name="email_00_notify"...
|
by: govolsbaby |
last post by:
Is there a way to leave the button forecolor unchanged when it is
disabled?
I have multiple buttons on the form and depending on various user
inputs, some will or will not be enabled but I'd...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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,...
| |