How do I disable a whole row in a table window

General discussion forum about all things Team Developer 6.x
Robertc
New Zealand
Posts: 3
Joined: 29 Mar 2017, 21:02
Location: Wellington, New Zealand

How do I disable a whole row in a table window

Post by Robertc » 03 Jul 2017, 23:27

Hi

I have a table window which displays events and their history. I would like to disable the rows showing historical data. I have tried put code in the SAM_FetchRowDone event to disable each column cell of a row but that does not work or something is enabling the cells again afterwards. I have seen a reference to M!Table which seems to have this functionality, but unless I absolutely have to I would prefer not to introduce more 3rd party code into a legacy app.

Thanks
Robert

Christof
Germany
Posts: 9
Joined: 06 Mar 2017, 07:27
Location: Frankfurt, Germany

Re: How do I disable a whole row in a table window

Post by Christof » 04 Jul 2017, 06:46

Hi, what do you exactly mean with disabling rows, some rows shall be editable, some not?

thomas.uttendorfer
Site Admin
Site Admin
Germany
Posts: 58
Joined: 05 Mar 2017, 17:19
Location: Munich Germany

Re: How do I disable a whole row in a table window

Post by thomas.uttendorfer » 04 Jul 2017, 08:08

Hi Robert,
not really sure about what you want.
But maybe this helps:
We catch SAM_RowSetContext then we disable or enable one or more columns.
Since you can't disable indiviual cells but only whole columns you have to set that whenever the context goes to another row.
Or do you want to have them gray? Then you have to set the textcolor of the column on SAM_FetchRowDone additonally.

Regards Thomas
Thomas Uttendorfer
[ frevel & fey ] Software-System GmbH
https://thomasuttendorfer.wordpress.com/

EwaldP
Austria
Posts: 60
Joined: 07 Mar 2017, 08:00
Location: Austria

Re: How do I disable a whole row in a table window

Post by EwaldP » 04 Jul 2017, 09:15

If you have no problem with 3rd party tools I recommend you MTable. There are functions for disable/enable cells and rows.

Ewald
Ewald P. Palmetshofer
EDV-Hausleitner GmbH
4020 Linz
www.edv-hausleitner.at

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 484
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: How do I disable a whole row in a table window

Post by Dave Rabelink » 04 Jul 2017, 11:54

Here another solution, quickly hacked together.

Block keystrokes when needed. The sample will let you edit the second column when the first column checkbox is on (as an example).

ReadOnlyTblCells.zip
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Return to “General Discussion”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests