(defun odcl:fillDataGrid(<Control> lst) ; <Control>... Form2/Dialog1/datagrid1
; Remove / clean all columns from datagrid before add
(repeat (setq count (dcl-grid-getcolumncount <Control>))
(dcl-Grid-DeleteColumn <Control> (setq count (1- count))))
; Add new columns with name
(if (setq count (length lst) c 0) ; c...column r... row
(repeat count
(setq r 0)
(dcl-Grid-InsertColumn <Control> c (car (nth c lst)) 0 100 )
(dcl-Grid-SetCellStyle <Control> r c 1)
(dcl-Grid-SetCellText <Control> r c (car (nth c lst)))
(setq r (1+ r))
(setq c (1+ c)))
)
)
Hello!
I have little trouble with set Text (strings) in define cell from dataGrid.
My example shows I want set all LayoutsItems after selected Drawing which names displays in columnheader and separate cell.
May I do wrong in my code upp. this implementation give nil:
(dcl-Grid-SetCellText <Control> r c (car (nth c lst)))
What I have to do?