grid dropdown combo list problems

Started by VovKa, February 18, 2011, 09:51:32 AM

Previous topic - Next topic

VovKa

(dcl_Grid_StartCellEdit <CONTROL> Row Column) does not work on cells of type 36 (dropdown combo list)

(car (dcl_Grid_GetCellDropList <CONTROL> Row Column)) for cells of type 36 (dropdown combo list) is in reverse order

OpenDCL.Studio.ENU.6.0.2.1

owenwengerd

I have fixed the (dcl_Grid_GetCellDropList) reverse order bug. (dcl_Grid_StartCellEdit) is working for me. Make sure you set the cell style before setting the drop list, otherwise the list gets reset when you change the cell style.
Owen Wengerd (Outside The Box) / ManuSoft

VovKa

thanks for the reply, Owen
but
here -> http://www.opendcl.com/forum/index.php?topic=700.msg3445#msg3445 Fred posted an example of using grid control - one can use Enter to start editing a cell in the next row
i've changed c:userdata_input_OnInitialize function to demonstrate "the bug"
Code (autolisp) Select
(defun c:userdata_input_OnInitialize (/ nRow)
      (foreach lstItem lstData
          (setq nRow (dcl_Grid_AddRow userdata_input_grd_data
                                      (list (car lstItem) (cdr lstItem))
                     )
          )
          (dcl_Grid_SetCellStyle userdata_input_grd_data nRow 1 36)
          (dcl_Grid_SetCellDropList userdata_input_grd_data nRow 1 '("1" "2" "3"))
      )
  )

run the code, type something in the first row, then press Enter, nothing will happen

owenwengerd

I tested your modified version of Fred's code. It appears to work if I just click in the cell without entering anything, but it does not work after typing something. I can't easily tell whether this is due to a bug in (dcl_Grid_StartCellEdit) or a bug in the lisp code, but the fact that it works if nothing is entered leads me to believe the bug is in the lisp code.
Owen Wengerd (Outside The Box) / ManuSoft

VovKa

i found one more thing
load Fred's code (with my modification) into vlide
set the breakpoint just at the beginning of C:userdata_input_grd_data_OnEndLabelEdit (before cond)
run the code
type something in first row
hit Enter
acad switches to vlide
press Continue
acad switches back
now you are in the second row and editing

owenwengerd

From your description, it seems to be working as I would expect.
Owen Wengerd (Outside The Box) / ManuSoft