Initialising a grid on a Headerless detail form without a business view

DaveBarber

Active Member
does anyone know the best way of re-intialising and clearing the grid on a headerless detail form after data has been procesed.
The form i am using has no business view.
I tried DELETE GRID LINES system function but this removes all grid lines and leaves no line for entering new data.

thanks

Dave
 
Hi Dave,

you can initialize after DELETE GRID LINES the Grid Buffer. Than you
cvan call insert Grid Buffer to Grid Row.
Must be possible.

best regrads
Marcus
 
Hi Dave,

Lets Try Press Button( FIND) system function after all records have been processed.

I guess this works. But I haven't tried it.

Good Luck!!
 
Hi Gov,

Yes this works if you have a business view on the grid, however as there is no business view my grid returns nothing and leaves no grid lines to enter data.

Any other ideas?

cheers
dave
 
Hi Dave,

When all records in the grid will be processed?Is it by saying OK or you have coded it in any manner?can you please explain it by the scenario, that could help us to understand it.
 
Hi Gov,

Basically the scenario is this:

1) Open form and enter a line of an order in grid.
2) Click on a form exit to get some values and return to headerless detail calling screen.
3) Click on a custom button to confirm order.
4) Clear grid and form to create new order using Delete Grid Row(FC Grid, <All Rows>)

On step 4 i am finding all my rows dissapear and I cannot get back into the grid to start to re-enter data.

thanks for your help on this
Dave
 
Dave,

I made an attempt. I created a headerless detail form with out business view and added push button where i have added code to clear the grid as follows

Listing of ER for Application: test (PTEST)


=======================================================================
FORM: Headerless Detail [HEADERLESS DETAIL] (WTESTA)
=======================================================================
CONTROL: BUTTON Push Button 16
EVENT: Button Clicked
-----------------------------------------------------------------------
0001 Delete Grid Row(FC Grid, <All Rows>)
0002 Insert Grid Row(FC Grid, "1")

This worked with me.

Lets try by using insert grid row system function after deleting all rows in the grid.

Hope this works

Good luck!!
 
Hi Dave,

Though Gov already posted a solution for you, here is my 2 (untested) cents.

1st.) Attach a dummy business view to the grid and press Find, but suppress the find action, which can be done several ways:
- SuppressFind system fuction
- using a hidden filter field, which results no record
- Form Properties / Options / No fetch on grid business view
- etc.

2nd.) Delete grid rows one at a time in a while loop, always the 1st while GetMaxGridRows returns with 1.

Regards,

Zoltán
 
Hi Gov - that seems to have done the trick. I tried before the insert grid rows but used all grid rows and that hadnt worked. Hadnt tried using 1 as the parm, but that has sorted it.

cheers

Dave
 
Back
Top