Grid drop down list

Started by johnM, September 30, 2009, 08:32:51 PM

Previous topic - Next topic

johnM

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

BazzaCAD

I think there where some bugs in the grid in this area. Try upgrading to 5.1.2.3 and see if that fixes it.
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

owenwengerd

Did you get this problem resolved?
Owen Wengerd (Outside The Box) / ManuSoft

johnM

I have not downloaded 5.1.2.3 yet to try
But will soon and let all know. Any other suggestions are welcome
Right now I’m just having to double or triple click because the program I’m developing is huge and I have a ton of issues to overcome. I am putting the grid through a lot, calculating cell values, copying one column’s values to another, drop down selection fireing other actions and trying to find user errors and more.
Once I get to a certain point I will post other questions

Thanks for the responce

johnM

I have the latest opendcl  5.1.2.3 and still have the list issue.

Quick background so maybe this will make more sense.
I’m in the wood working industry. Most people have heard of plastic laminates
Most everyone knows Formica. There are several manufactures of laminates. Formica, pionite, wilsonart just to name a few.
I have a grid with 3 columns (manufacture / number / color/) all set to dropdown list 40
What I an trying to accomplish is when the user selects a manufacture, that manufactures list of laminates numbers and colors are loaded into the number and color dropdown lists

The issue is when a manufacture is selected then you immediately click on the Number cell the list of numbers is not displayed just a blank dropdown list.
If you select a manufacture and click on a different cell then click on the number cell the list is displayed.

I have verified that if you click on the number cell immediately after a manufacture is selected the list is loaded but not displayed

I use the endlabeledit event to load the list and it seems like if you immediately click on the number cell its beginlabeledit event is overriding the display somehow. I do not have the beginlabeledit event active for that control.
Any suggestions?

owenwengerd

I understand what you're saying. It would help me debug the problem if you could create a very simple modeless form with a grid and OnInitialize handler that populates it with two combos like you describe. You've provided enough information that I could probably create one myself, but if you do it you can verify that the problem still occurs in the sample before I spend time testing.
Owen Wengerd (Outside The Box) / ManuSoft

johnM

Thanks for prompting me to write a test grid. It made me think and I made a few changes.
In my test grid, which was a very simple grid, every thing loaded like it should
In my real grid its loading but you have to click 3 times not twice but I have a lot going on and I will have to plow through the code.