Editable Grid

Started by vasch the stampede, January 05, 2018, 02:13:29 AM

Previous topic - Next topic

vasch the stampede

How I can edit a grid like in a excel sheet?

I tried this:
(DEFUN C:grid ()
(DCL_PROJECT_IMPORT
  '("YWt6A5YQAABbt6v1BuKTKTUxLT9qQDskOFY0Pm0JHL4W3Ov0JtJVXTjd/ConljzdjGoXX094YWXo"
    "wEjQ8nVpuPvMjn+4eQ8bImajh30yuklAruN1YaoNmMgJkAJrJGpPWCJMvYMEsOINGJiF2K3smibs"
    "LNNOP7nW96SWTrsWQWOc6F5hb0NXXlSagZwqp7BwrNTX6CgNdQ91TfSMJXOJLzhfFJiJ66q0Eaw5"
    "ZtOfTxOCaJvI9EGrN+1sz/ht+6fV6AO6UbpTvNMjOdKYL+xbtEbcHcktdYE7Rznm5Spfp1ya2d4q"
    "JVrrrHwsQLTdqr0XgmXX+ZnqnqqUb+vYU1dpy/2Mt43WQEMNg/IO59SqnoWC2JBk0oMRfcB9hmie"
    "kVjhZqp3VA716wJrKI+H5caKMCBdi6aE4qosbQnhqov9fJfOpAB/DlGeecIS2HIsMb8Aurx1JRZT"
    "g/RYKxroyfxk1+VIDZUa4TDIucdBsF0qvhk5gXin8HwoyAEumEA5nWvGwf8EMKqyN5ydkg5gVwmL"
    "DwmNoysOkvO4oFHVZGYZSXgeaXl/aXyQyJx6ZQZjtcdjrhu5hwN9iWPakOeC3b7AbPfNcpTjEZJM"
    "N2tNBumqwWOSYf479b/As55fZ8FrpiVxxn+OaL62pFvOUGBouVohbgaeeaCifoVLvql/IbO8hMYl"
    "8f3FflmihAIhGkEEvgBujme2SZSwob8duCGxgW3ygZbgeHDQ+o/hM0OsexkPKdKPjHIjqs9QxIe+"
    "avQbrTtdjlJOP9Z/Rk95f4FQiUMiUekPmV7w+ZU9Gg3D4RLQlUcyvovNQOWVH+R80O2x0AlsokEx"
    "Z6LRtpu601yRsEaZEeNACyXW9UEV4y8uUHR0FOLfXgHtgHSVm4Cxip1zSneLFoJpqt1VitZZeKFq"
    "JCOByQQYBuHzifXG5dWPBJrDx5gaH4MFxvPCTQWMK5iieaYNpawNjtYY4561LQr1xHedQqSuCZtM"
    "5JO4NxhWm7SGtLeX8ItyaoJu5gB3KBN82+vt08r1gZwwyHnmJ3qGB5SCMk2Rc56fqlHNSmD8j9G/"
    "gXueb+QZn8kqGJ8pnoFsDk+apUWztBD4All/kXoCdE7gctl/6SbGTMkFPSScsOPfN1XW8Otayfdw"
    "mZjOBQQxWgcAfE2oiwA="
   )
) ;_ fine di DCL_PROJECT_IMPORT
(DCL_FORM_SHOW mySetParam/Form1)
(DCL-PROJECT-UNLOAD "mySetParam" T)
(PRINC)
) ;_ fine di defun

(defun c:mySetParam/Form1#OnInitialize (/)
(DCL-GRID-ADDCOLUMNS mySetParam/Form1/Grid (LIST (LIST "Letters" 0 100)))
(DCL-GRID-ADDCOLUMNS mySetParam/Form1/Grid (LIST (LIST "Value" 0 100)))
(DCL-GRID-ADDROW mySetParam/Form1/Grid "A" "1")
(DCL-GRID-ADDROW mySetParam/Form1/Grid "B" "2")
(DCL-GRID-ADDROW mySetParam/Form1/Grid "C" "3")
(DCL-GRID-ADDROW mySetParam/Form1/Grid "D" "4")
(DCL-GRID-ADDROW mySetParam/Form1/Grid "E" "5")
(DCL-GRID-ADDROW mySetParam/Form1/Grid "F" "6")
)

(DEFUN c:mySetParam/Form1/Grid#OnSelChanged (Row Column /)
(DCL-GRID-STARTCELLEDIT mySetParam/Form1/Grid)
) ;_ fine di defun

(DEFUN c:mySetParam/Form1/Cancel#OnClicked (/)
(DCL-FORM-CLOSE mySetParam/Form1)
) ;_ fine di defun


Where am I wrong?