Editing a Line in a Line form

shibilyshibily Member Posts: 89
Hai All,

Is it possible to make a particular line non editable?

My program shoul work as follows :

If X is '' then the line should be editable.
If X <> '' then that particular line only should be non editable and the rest of the lines in that line form should be editable.

Any help would be apprciated............

Comments

  • garakgarak Member Posts: 3,263
    Here an example:
    Form - OnAfterGetCurrRecord()
    CurrForm.editable(x = ''); //Note that x should be dependent on the CurrentRec
    

    Regards
    Do you make it right, it works too!
  • shibilyshibily Member Posts: 89
    garak wrote:
    Here an example:
    Form - OnAfterGetCurrRecord()
    CurrForm.editable(x = ''); //Note that x should be dependent on the CurrentRec
    

    Regards

    After including this particular code in the Form - OnAfterGetCurrRecord(),

    the whole lines in the list form has become non editable....

    What could be the issue??
  • Miklos_HollenderMiklos_Hollender Member Posts: 1,598
    Try the same in OnAfterGetRecord.

    Yes it makes the whole form uneditable but that should be OK with OnAfterGetRecord: if you are on the record that triggers it, you can't edit that, and you couldn't edit anything else either as you are always editing the current line. And if you are on a record that doesn't trigger it, that makes the whole form editable but that shouldn't be a problem as you can only edit the current record anyway.
  • PsixoLogPsixoLog Member Posts: 5
    Hi, all!
    For example you have something like this:
    Form - OnAfterGetCurrRecord()
    CurrForm.EDITABLE(ID > 100);
    
    - this means that all lines in your table which has value greater than 100 become editable
    In my point of view, in your situation you havent lines which meets the conditions, so thea are noneditable.

    And you must select properties editable - YES for control.
  • garakgarak Member Posts: 3,263
    and what for a value has "X" ?
    Do you set this global or on the Rec?
    Do you make it right, it works too!
  • PsixoLogPsixoLog Member Posts: 5
    edited 2008-12-03
    .
  • PsixoLogPsixoLog Member Posts: 5
    garak wrote:
    and what for a value has "X" ?
    Do you set this global or on the Rec?
    I used Rec
  • garakgarak Member Posts: 3,263
    and all Lines are not editeble? Also if you click into the line?
    Other question: The propertie EDITABLE of the form / Fields is <true> ?
    Do you make it right, it works too!
  • PsixoLogPsixoLog Member Posts: 5
    Hi, Garak
    Yes, all lines in the table which don't meets the conditions not editable.
    The propertie EDITABLE of the form / Fields is <true>,
    but if you set it to <false> anyway the lines will be noteditable
Sign In or Register to comment.