Disabling textbox if a different textbox text is null

  • Thread starter Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date Start date
N

Nicholas Paldino [.NET/C# MVP]

Aaron,

You could subscribe to the TextChanged event on the textbox, and if the
text is an empty string, then you could disable whatever textboxes you need.

Hope this helps.
 
Hello,

I have have a series of textboxes(txtFineReason1 thru txtFineReason6), only
txtFineReason1 is required. This series of textboxes has a corresponding
series of textboxes(txtFine1 thru txtFine6), only txtFine1 is required.

How could I disable txtFine2 thru 6; if there is no keystrokes in
txtFineReason2 thru 6?

TIA

Aaron
 
Nicholas,

Thanks

Aaron

Nicholas Paldino said:
Aaron,

You could subscribe to the TextChanged event on the textbox, and if the
text is an empty string, then you could disable whatever textboxes you need.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Aaron said:
Hello,

I have have a series of textboxes(txtFineReason1 thru txtFineReason6),
only
txtFineReason1 is required. This series of textboxes has a corresponding
series of textboxes(txtFine1 thru txtFine6), only txtFine1 is required.

How could I disable txtFine2 thru 6; if there is no keystrokes in
txtFineReason2 thru 6?

TIA

Aaron
 
Back
Top