Datagrid edit cells

Started by cadplayer · 2016-04-26 18:30 UTC · 3 replies · SMF topic #2366

I am not sure I understand right Datagrid-object in odcl.
I only want to can type or edit datagrid-cells-captions, what I have to do or which events are important to know ?!

(defun c:fm_ProjectManager/dialoag_PM#OnInitialize (/)
    (dcl-Grid-Clear fm_ProjectManager/dialoag_PM/db_Data)
    (dcl-Control-SetRowHeader fm_ProjectManager/dialoag_PM/db_Data t)
    (dcl-Control-SetColumnCaptionList fm_ProjectManager/dialoag_PM/db_Data (list "Type" "Description"))
  )
These rows only initialize datagrid, but I cannot edit or write in cells !
Two important things to consider:
1. The first column behaves differently than the others. Sometimes you have to make it zero width and skip it.
2. You have to set a cell style for every cell in order to edit them. The cell style is everything.

I hope this helps.
Hi, I set RowHeader to false, if I don't need it. Regards, Fred
thanks for reply works perfect!