Grid Validation
Posted: Fri Jan 30, 2015 10:35 am
Hi,
Sorry if this is a dumb question but I'm very new to grids. I have successfully created a grid that accepts input and is properly reading changes back into the proper arrays (thanks to the BR Wiki). However, my problem is that I need to validate most of the entered data and I'm not sure how to do that. I would prefer to do this while the user is entering the data either by cell or row. I am not sure where to put the validation code or what specific commands to use honestly. I would greatly appreciate any feedback. Here is my code:
06500 PRINT FIELDS "4,1,grid 19/80,headers": (MAT HEADINGS$,MAT WIDTHS,MAT FORMS$)
06600 PRINT FIELDS "4,1,grid 19/80,=": (MAT DIV$,MAT ACCT$,MAT DEBIT,MAT CREDIT,MAT DESC$)
06700 INPUT FIELDS "4,1,GRID 19/80,ROWCNT,CHG": ROWS ! # of changed rows
06800 MAT SUBSCR(ROWS)
06900 INPUT FIELDS "4,1,GRID 19/80,ROWSUB,CHG,NOWAIT": MAT SUBSCR ! read subscripts
07000 MAT DIV$(ROWS) : MAT ACCT$(ROWS) : MAT DEBIT(ROWS) : MAT CREDIT(ROWS) : MAT DESC$(ROWS) ! redimension
07100 INPUT FIELDS "4,1,GRID 19/80,ROW,CHG,NOWAIT": (MAT DIV$, MAT ACCT$,MAT DEBIT, MAT CREDIT, MAT DESC$) ! read changed rows
I'm using BR 4.31fb.
Thanks in advance.
Sorry if this is a dumb question but I'm very new to grids. I have successfully created a grid that accepts input and is properly reading changes back into the proper arrays (thanks to the BR Wiki). However, my problem is that I need to validate most of the entered data and I'm not sure how to do that. I would prefer to do this while the user is entering the data either by cell or row. I am not sure where to put the validation code or what specific commands to use honestly. I would greatly appreciate any feedback. Here is my code:
06500 PRINT FIELDS "4,1,grid 19/80,headers": (MAT HEADINGS$,MAT WIDTHS,MAT FORMS$)
06600 PRINT FIELDS "4,1,grid 19/80,=": (MAT DIV$,MAT ACCT$,MAT DEBIT,MAT CREDIT,MAT DESC$)
06700 INPUT FIELDS "4,1,GRID 19/80,ROWCNT,CHG": ROWS ! # of changed rows
06800 MAT SUBSCR(ROWS)
06900 INPUT FIELDS "4,1,GRID 19/80,ROWSUB,CHG,NOWAIT": MAT SUBSCR ! read subscripts
07000 MAT DIV$(ROWS) : MAT ACCT$(ROWS) : MAT DEBIT(ROWS) : MAT CREDIT(ROWS) : MAT DESC$(ROWS) ! redimension
07100 INPUT FIELDS "4,1,GRID 19/80,ROW,CHG,NOWAIT": (MAT DIV$, MAT ACCT$,MAT DEBIT, MAT CREDIT, MAT DESC$) ! read changed rows
I'm using BR 4.31fb.
Thanks in advance.