Re: Diabling Import/Export to Excel (solution)
How to disable import Excel in a grid.
Create a field in your grid like ERRC
Disable input of this field
Hide this field
In the grid event rules « Add Last Entry Row to Grid » input a value in this field (for newest rows)
In the grid event rules « Write Grid Line-Before » input a value in this field (for oldest rows)
In the grid event rules « Row is Entered » check if this field have the good value else delete this row.
In the grid event rules « Row is Exited » check if this field have the good value else delete this row.
Conclusion
When you add values with keyboard, it’s a new row in the end of the grid, then the value in the field is good.
When you import row, they are written before the first row then the field is blank, and this row will be deleted
We disable this field, to be sure that will not import with the test value.
We can put this field in the beginning or the end of the grid, there is any influence.
That’s all
Import is disable
WarningApplication: Bruno Courant (P55BC)
=======================================================================
FORM: Header/Detail [HEADER DETAIL] (W55BCB)
=======================================================================
CONTROL: GRID Grid
EVENT: Add Last Entry Row to Grid
-----------------------------------------------------------------------
GC EC = "E"
-----------------------------------------------------------------------
EVENT: Write Grid Line-Before
-----------------------------------------------------------------------
GC EC = "E"
-----------------------------------------------------------------------
EVENT: Row is Entered
-----------------------------------------------------------------------
If GC EC is not equal to "E"
Delete Grid Row(FC Grid, <Currently Selected Row>)
End If
-----------------------------------------------------------------------
EVENT: Row is Exited
-----------------------------------------------------------------------
If GC EC is not equal to "E"
Delete Grid Row(FC Grid, <Currently Selected Row>)
End If