Link to home
Create AccountLog in
Editors IDEs

Editors IDEs

--

Questions

--

Followers

Top Experts

Avatar of Mahmoud Al Jundi
Mahmoud Al Jundi🇯🇴

PowerBuilder Datawindow protect a field
Hello

I am not an expert in powerbuilder

I have a grid datawindow , 5 columns, is there away to protect a single cell from editing based on a condition ?

 I used protect but it will protect / unprotect  the whole column, even when protect used , the Enter stops working to Insert a second row (Down key event)

 I tried also in itemchanged event, (if the user  changed value the original value will override),
but didn't work also.

not necessary  "PROTECT" but any idea stops changes to this cell.

Thanks

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of lbushbylbushby

You can use 'Protect' to achieve this but you need to use 'getrow()' as part of the expression to restrict to the row you are interested in.

e.g. entering the following as the 'protect' expression will protect the cell in row 3 only:

    if (getrow()=3,1,0)


Avatar of Mahmoud Al JundiMahmoud Al Jundi🇯🇴

ASKER

Below is what I am using, please advise the correct syntax

setitem(row,"trns_price",w_new_price1)
dw_basic.object.trns_price.protect

Avatar of Mahmoud Al JundiMahmoud Al Jundi🇯🇴

ASKER

Below is what I am using, please advise the correct syntax

setitem(row,"trns_price",w_new_price1)
dw_basic.object.trns_price.protect = true

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


ASKER CERTIFIED SOLUTION
Avatar of lbushbylbushby

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of kmanoharnaikkmanoharnaik🇮🇳

hi,

whats that you want to do with that perticular cell? i mean what are the conditions to make that cell protected.

Generally protect expression at design mode works for entire row or entire column.
we can control if u can specify the row no, or if its new row or if its modified..so on..
please let me know the condition.

thanks
msn

SOLUTION
Avatar of loksloks🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of Mahmoud Al JundiMahmoud Al Jundi🇯🇴

ASKER

Thank you guys
Editors IDEs

Editors IDEs

--

Questions

--

Followers

Top Experts

Development in most programming languages is frequently done with an editor or integrated development environment (IDE). An IDE is a software application that provide comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools and a debugger. XCode, Visual Studio, Adobe Dreamweaver and Eclipse are some of the more popular development tools, but an editor or IDE can be anything from simple text editors to sophisticated programs. Related topics: All programming and development language, database and web based content management systems topics