Log In    |    Knowledge Base    |    4D Home
Tech Tip: How to disable the Drop Zone property of Data Grid header and footer
PRODUCT: 4D Web 2.0 Pack | VERSION: 11.1 | PLATFORM: Mac & Win
Published On: March 26, 2008

PLEASE NOTE: This Tech Tip applies to 4D Web 2.0 Pack v11 Release 1 (11.1)

By default all cells of a Data Grid are set as Drop Zones, meaning objects can be dropped onto them. This includes any header and footer rows that have been added. In order to disable the Drop Zone property for these specific cells, execute the setDropCells function.

Here is the syntax:

myGrid.setDropCells(row, column, isDroppable)

So for example, on a Data Grid with 2 header rows and 2 footer rows (and other rows in between), to disable the Drop Zone property for these specific rows, execute the following commands:

myGrid.setDropCells(0, null, false);
myGrid.setDropCells(1, null, false);
myGrid.setDropCells(myDataGrid.getFooterRowNumber(0), null, false);
myGrid.setDropCells(myDataGrid.getFooterRowNumber(1), null, false);

The null value specifies that the Drop Zone disable will apply to all columns in given row.

More information regarding Data Grids can be found in the Daxipedia: