2009-10-01 03:32 UTC
Runtime 5.1.1.8
I have a column with the top cell being a drop down list and the cell below it is also a drop down list.
What I am trying to accomplish is: when I pick an item from the top cell I want the cell below to load a list pertaining to the item in the cell above.
I have tried OnSelChanged, OnBeginLabelEdit and OnEndLabelEdit with no luck.
When I select a item in the top cell then click on the cell below the list is blank, but if I
Then click back on the top cell then click the cell below the list is filled.
I tried the code below and got the list to populate but now you have to click the cell 3 times to get it to drop down (but the list is there)
(defun c:QD_ELE1_ELE1_Grid1_OnEndLabelEdit (Row Column /)
(if (= row 4)(calrws1));_call to cal rows
(if (equal (list row column)(list 0 1))
(progn
(dcl_Grid_CancelCellEdit QD_ELE1_ELE1_Grid1);_added to populate style cell list
(if(=(dcl_Grid_GetCellText QD_ELE1_ELE1_Grid1 Row Column)"Base");_type text
(dcl_Grid_SetCellDropList QD_ELE1_ELE1_Grid1 (1+ Row) Column (qdcl_gtf "base.jdb"));_populate style cell w/ list
);_if
);_progn
);_if
(princ)
);_defun
any suggestions?
thanks
I have a column with the top cell being a drop down list and the cell below it is also a drop down list.
What I am trying to accomplish is: when I pick an item from the top cell I want the cell below to load a list pertaining to the item in the cell above.
I have tried OnSelChanged, OnBeginLabelEdit and OnEndLabelEdit with no luck.
When I select a item in the top cell then click on the cell below the list is blank, but if I
Then click back on the top cell then click the cell below the list is filled.
I tried the code below and got the list to populate but now you have to click the cell 3 times to get it to drop down (but the list is there)
(defun c:QD_ELE1_ELE1_Grid1_OnEndLabelEdit (Row Column /)
(if (= row 4)(calrws1));_call to cal rows
(if (equal (list row column)(list 0 1))
(progn
(dcl_Grid_CancelCellEdit QD_ELE1_ELE1_Grid1);_added to populate style cell list
(if(=(dcl_Grid_GetCellText QD_ELE1_ELE1_Grid1 Row Column)"Base");_type text
(dcl_Grid_SetCellDropList QD_ELE1_ELE1_Grid1 (1+ Row) Column (qdcl_gtf "base.jdb"));_populate style cell w/ list
);_if
);_progn
);_if
(princ)
);_defun
any suggestions?
thanks