Tipswip   >   Windows   >   Complex Grids

Complex Grids

Omnis used the name "Complex Grids" for a reason. They are powerful, but they are complex.

Click "Run Demo" to review some complex grid notation in a demo window.

Complex Grid $ctarget

The row number is not required when setting $ctarget. The target will be on the current line in the datalist represented by the complex grid.

Do $ctarget.$assign($cinst.$objs.ComplexGrid.$objs.FieldName)
Do $ctarget.$firstsel.$assign(0)
Do $ctarget.$lastsel.$assign(1000)

Click "Run Demo" to demonstrate.

Complex Grid $exceptions

COMPLEX GRID $clearexceptions

$clearexceptions had always confused me. I thought it would revert the complex grid to look the way it was before I applied any exceptions.

But, it appears that the logic for $clearexceptions is to revert to the last "column" setting.

Click "Run Demo" to demonstrate.

Complex Grid $fieldstyle

I spent a few hours trying to make use of the $fieldstyle property in complex grids only to reach the conclusion that it can't be done. Well, it can't be done for individual cells.

You can change the $fieldstyle for a complex grid column, but you can't change it for a single cell in a column.

Tech Support confirm this and suggested that this "feature" won't be changed.

To work around this problem, you need to "relax" the #STYLE restrictions on the $fieldstyle properties that you want to be able to change for individual cells in your complex grid. You can then modify the individual property, instead of trying to change the $fieldstyle.

Click "Run Demo" to demonstrate.

Complex Grid $gridcolumn

If you have a reference to an object in a complex grid, how do you know which column of the
complex grid it is located in?

The $gridcolumn property will tell you the answer. See the sample code provided.

Complex Grid $gridsection

If you have a reference to an object in a complex grid, how do you know which section of the
complex grid it is located in?

The $gridsection property will tell you the answer. $gridsection returns the following
constants: kGridColumnHeader, kGridHeader, kGridNone, kGridOther, or kGridRow

See the sample code provided.

Complex Grid Columns

To add columns to a complex grid you need to add a divider to the $dividers group.

Do $cinst.$objs.GRID.$dividers.$add(POSITION) Returns rDivider

Complex Grid Select lines

If the complex grid $enterable property is set to kTrue, the user can no longer select lines the same way as in a headed list.

This tip shows how to add a simple $selected checkbox to the complex grid. Click "Run Demo" to demonstrate.

Complex Grid Spreadsheet UI

Need a clean looking complex grid? Why not make it look like a spreadsheet?

This demo also provides code for having the up and down arrow keys moving vertical from cell to cell in the complex grid.

Click "Run Demo" to demonstrate.