Welcome! Log In Create A New Profile

Advanced

Table editable - limit to only edit, no add or delete

Posted by PETER ZHOU 
PETER ZHOU
Table editable - limit to only edit, no add or delete
September 24, 2008 12:22PM
Hi,

How to limit the editable table to only EDIT mode...don't allow ADD or DELETE ?

Regards,

PETER ZHOU
Fabrice Harari.pcs.crosspost
Re: Table editable - limit to only edit, no add or delete
September 24, 2008 03:44PM
Hi Peter...

There is a checkbox to allow/disallow cascading input... If you uncheck
it, there will be no add anymore...

For the delete, it's done via the right clic menu (if I understand what
you are doing), so you can disable that too...

best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

More information on [www.fabriceharari.com]


PETER ZHOU wrote:
> Hi,
> How to limit the editable table to only EDIT mode...don't allow ADD or DELETE ?
> Regards,
> PETER ZHOU
>
Message forwarded from pcsoft.us.windev
Jimbo
Re: Table editable - limit to only edit, no add or delete
September 24, 2008 09:51PM
Hi Peter,

File Tables are quite programmable!

1 - in the Details Tab of the Table's properties, click off 'Backup during row exit'. This will give you full control of storing a row's contents or not. Delete the 'Delete' Button of the Table Form - there's no right-click Delete on the RAD Table. (Of course, you could introduce a right-click delete anyway, but you won't)

2 - When entering a Row ('Row Entry in Edit of Table'), you can easily find out whether it's a new (= empty) row or an already filled-in row. If it's empty - remember it must be the Table's last line +1 - then just position the cursor 1 line up.

3 - When entering an already filled-in row, you just have to check on 'Row Exit of Table' whether the would-be changes are acceptable or not. If they are then just do an HModify of the record. Remember that a user could modify a row in such a way that s/he would end up with a duplicate key-field in the file OR could change a text field to being 'empty'.

Ok, Ok, here I have a full example of editing a Table, validating input and saving / modifying rows, an input form with validation and much more. In your case, you just have to strip the HAdd(..) & Creation part and delete the delete button. Sorry, most of it, except for the code, is in German.

[www.windev.at]

Kind regards, Guenter
PETER ZHOU
Re: Table editable - limit to only edit, no add or delete
September 25, 2008 01:46PM
Dear all,

Thanks !

Let me yr example.

Regards,

PETER ZHOU
PETER ZHOU
Re: Table editable - limit to only edit, no add or delete
September 25, 2008 02:14PM
Quote
Fabrice Harari.pcs.crosspost
Hi Peter...

There is a checkbox to allow/disallow cascading input... If you uncheck
it, there will be no add anymore...

For the delete, it's done via the right clic menu (if I understand what
you are doing), so you can disable that too...

best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

More information on [www.fabriceharari.com]


PETER ZHOU wrote:
> Hi,
> How to limit the editable table to only EDIT mode...don't allow ADD or DELETE ?
> Regards,
> PETER ZHOU
>
Message forwarded from pcsoft.us.windev

Hi Fabrice,

How to program the DELETE function with the righ-click menu ?

thank you in advance.

Regards,

PETER ZHOU
Jimbo
Re: Table editable - limit to only edit, no add or delete
September 26, 2008 10:29AM
Peter, It's easy. Make a button with the code to delete the current line. If you dont want the user to see the button, put it outside the window or make it invisible. In the table properties you have the 'right click' combo to choose from buttons - choose the delete button. Right click will activate that button then. Regrads, Guenter
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: