Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable add new row based on row-data

Status
Not open for further replies.

jaegerkimberly

IS-IT--Management
Dec 15, 2004
2
US
I need to disable adding a new row (+) in the positions panel only when the current position_status = 'Disapproved'. I am wondering what the best method of doing this would be....

Thanks,
Kimberly
 
Possibly on field change of current_position_status with code similar to what I did on a page I did this to. I did this on rowInsert for Training.Emplid. I remove the + sign when initially adding a row with the + and do not add it back until they save the action.

Code:
If %Component = Component.N_EE_TR_REQUEST Or
      %Component = Component.TRN_STUDNT_CRS_DT2 Then
   
   Local Rowset &myRowSet;
   
   &myRowSet = GetRowset();
   &myRowSet.InsertEnabled = False;
   
End-If;

Then when I want to add it back, I do it on savePostChange.

Code:
If %Component = Component.N_EE_TR_REQUEST Or
      %Component = Component.TRN_STUDNT_CRS_DT2 Then
   
   Local Rowset &MyRow;
   &MyRow = GetRowset();
   
   &MyRow.InsertEnabled = True;
   
End-If;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top