SetCellDropList question

Started by copter, October 15, 2010, 04:50:32 AM

Previous topic - Next topic

copter

Hello
I am probably doing something wrong:
I can't populate on intialize a droplist cell in a grid.
I joined a little sample in order to demonstrate the issue.
I tryed with odcl 5 and odcl 6: Same
Thanks for your help.

owenwengerd

That looks like a bug.  I took a quick look at the code, and it's using the grid control's column default dropdown list and ignoring the list set for the cell.  I'll get that fixed for the next build.

owenwengerd

#2
After investigating more deeply, I now see that this is working as designed. The cell must have a style set or it uses the column default drop list even if it has its own drop list set. This is done so that settings for a cell can revert back to "inherit from column defaults" mode by setting its style to -1. Your code works if you explicitly set the cell style via (dcl_Grid_SetCellStyle) before adding the list items.

copter

Thanks Owen It works

Initialy I wanted to modify the defaut drop list with  "dcl_Control_SetColumnListItems"
And it doenst work: (Even if the cells type are defined):
(dcl_Control_SetColumnListItems Test_Form1_Grid1 (list (list "A" "B" "C"))) do nothnig.
That is the reason why I choose to set the list cell by cell.

Any idea ?

owenwengerd

In your example, the list would be for column 0. Try this instead:
Code (autolisp) Select
(dcl_Control_SetColumnListItems Test_Form1_Grid1 (list nil (list "A" "B" "C")))

copter