grid onselchanged

Started by Raymond Barlow, July 30, 2012, 11:02:50 AM

Previous topic - Next topic

Raymond Barlow

the only way a can get the grid onselchanged event to work is the change the drop down selecting click off the grid selection then reselect the grid for the event to fire.
can someone help me with this?

I am trying to have the user select a name from a dropdown in a grid control then select a date in to same grid different column to update a drawing format.

owenwengerd

Which version of OpenDCL Runtime are you using? I cannot reproduce the problem in build 7.0.0.6.

Raymond Barlow

I am using 7.0.0.6 studio
I install  7.0.0.6 run time but is there a way to check this with lisp

owenwengerd

The version is displayed in the command line when OpenDCL Runtime loads, or you can use the (dcl_GetVersionEx) function.

It might be helpful if you could upload a very simple sample project and lisp code that I can use to reproduce the problem.

Raymond Barlow

thanks I am using rumtime  7.0.0.6
Here is a test sample of what I am tring to do.

thanks for all your help
feel free to make any changes as needed.

Raymond Barlow

Here is an updated example
the combo example show whats I would like to do with the grid

hope this make sense

thaks

owenwengerd

It looks like in your original code, you are calling (dcl_Grid_GetCellText format_Form1_Grid1 Row Column) and expecting that to return the value of the previously-active cell. It actually returns the value of the newly-activated cell. As best I can tell, the OnSelChanged event is working fine. So, your second version using OnEndLabelEdit appears to be the correct way to do what you want.

So, I think what you're after is for the OnEndLabelEdit to fire as soon as the dropped-down combo selection changes. For that, try changing your cell style to a dropdown list (18). The dropown list should end editing as soon as a selection is made.

Raymond Barlow

thanks for your reply and looking at my code.

changing the style to 18 does give the desired effect but I what the user to be able to type in a reply if missing from the list (see combo example)
also I was hope the date would work the same way as style 18

thanks for your time

owenwengerd

There isn't any way to get exactly what you want. Maybe you could handle OnCancelClose (which gets called when the user presses Enter) and have it just end editing instead of closing the dialog. This would make Enter a one-key shortcut to end editing and update the text box.

Raymond Barlow

How would I get it to end editing?

please and thanks

owenwengerd

You can call (dcl_Grid_CancelCellEdit) or anything that causes the active cell to lose focus.