NetTalk Central

Author Topic: Code to Reset a Control  (Read 3154 times)

RichBowman

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • Email
Code to Reset a Control
« on: January 16, 2012, 01:56:53 PM »
I have a form with 3 drop downs and 1 Browse. The dropdowns build the filter for the Browse. The 1st dropdown resets the 2nd, the 2nd resets the 3rd and the 3rd resets the Browse.

In some cases the 3rd dropdown only has 1 selection. I can easily check the data after the 2nd dropdown is accepted to determine the number of records in the 3rd dropdown. If there is just 1 record, how do I reset the Browse in code and skip the 3rd dropdown? I assume this would go after the 2nd dropdown is accepted.

Second, if the 3rd dropdown has but 1 record, is it possible to hide it?

Still learning ....

Thank you,

Rich

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Code to Reset a Control
« Reply #1 on: January 16, 2012, 04:15:06 PM »
do Refresh::BrowseEquate

Opening the source and searching on the equate is a good way to find out this stuff. If you add server side code, look at the source and see what it does before and after the SS code runs.

You can hide you control by using a GSV on the template. So when you determine how many records drop 3 has, if it meets your criteria, change the value of your session value and refresh the control.