
This method adds a new item to the end of a EditableGrid control and will also fill in the cells in the entire row according to how many columns have been setup. Using this method the very first cell under the first column can be specified to display an image from the image list. Use Grid_SetItemImage to set the icons of any column cell.
Returns the following according to the situation:
The recommended convention is passing the control identifier directly:
Copy Code |
|---|
(Odcl_Grid_AddRow MyControlReference [as Reference] (list [Optional] nImageIndexCol1 [as Integer] sTextCol1 [as String] [Optional] nImageIndexCol2 [as Integer] sTextCol2 [as String] ... [Optional] nImageIndexColN [as Integer] sTextColN [as String] ) ) |
An alternative convention is to identify the control by providing the project file, the dialog name and the control name:
Copy Code |
|---|
(Odcl_Grid_AddRow ProjectFile [as String] DialogName [as String] ControlName [as String] (list [Optional] nImageIndexCol1 [as Integer] sTextCol1 [as String] [Optional] nImageIndexCol2 [as Integer] sTextCol2 [as String] ... [Optional] nImageIndexColN [as Integer] sTextColN [as String] ) ) |
The style of the cell or column only governs the behavior of the cell and what happens when the user clicks on the cell.
For exampleb if you set the style 33 - Linetype Cell, the current selection for the linetype must be correctly set in the Grid_AddString or Grid_AddRow functions. The item may not be changed to correctly display one of the listed items.
Please create lists as follows using the list keyword:
(list (list x y ...) (list x y ...) ...)
It seems that ObjectARX does not always handle lists created as follows:
'(x y ...) (x y ...) ...
Copy Code |
|---|
; Populate the list (setq rValue (Odcl_Grid_AddRow MyProject_MyForm_MyControl (list 2 "Debit Card" 3 "Credit Card"))) |
Grid_Clear, Grid_DeleteRow, Grid_FillList, Grid_GetRowCount, Grid_GetRowItems, Grid_InsertRow, Grid_SelCurRow