INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Disable DataWindow, but allow to scroll

Disable DataWindow, but allow to scroll

(OP)
Hello,

My business rules require to disable datawindow user status changes to 'DONE'. This is so that they can not make any more changes to the datawindow. I can easily do so by setting dw_2.enabled = FALSE.

However, doing so will also disable the scroll bar. We still want them to be able to scroll datawindow and see all the data.

Question, how can I disable the datawindow but still let them scroll and see all the records?

Thank you,
Stan.

RE: Disable DataWindow, but allow to scroll

You need to disable the columns which allow data entry. Set either the protect property to TRUE or the tab order to 0.

Matt

"Nature forges everything on the anvil of time"
www.anvil-of-time.com

RE: Disable DataWindow, but allow to scroll

(OP)
Well that would be too much coding.

I found another option: dw_1.Object.DataWindow.ReadOnly='yes'

But it does not work. May be I use wrong syntax?

Thank you,
Stan.

RE: Disable DataWindow, but allow to scroll

If you don't want to explicitly spell out each column, you could loop through all and set their tab order through a modify like Matt suggested. Something like:

Long ll_COL

FOR ll_COL = 1 TO Long( dw_REF.Object.DataWindow.Column.Count )
dw_REF.Modify( "#" + String( ll_COL ) + ".TabOrder='0'" )
NEXT


// keep in mind, that's the general idea of the code... may not be 100% accurate syntax

RE: Disable DataWindow, but allow to scroll

It's not much coding if you put an extra column in your datawindow, use it in an expression on the Protect property of the columns you want to prevent entry, and then put code to set the value of the extra column once the user changes the status to 'DONE'.

Standard PB type stuff when working with datawindows...

Matt

"Nature forges everything on the anvil of time"
www.anvil-of-time.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close