OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: diogenes on May 27, 2016, 12:04:28 PM

Title: grid behavior
Post by: diogenes on May 27, 2016, 12:04:28 PM
Hi.
I have a grid (table). I need the behavior is like an excel sheet. When pressing return to finish entering data in a cell, the focus goes to the next cell. It's that possible?
thanks
Title: Re: grid behavior
Post by: Fred Tomke on May 31, 2016, 10:06:16 PM
Hi, yes it is. Have a search for CancelCellEdit, SetCurCell and StartCellEdit, maybe also AddRow in the forum and in the help. That's all you need.
Regards, Fred
Title: Re: grid behavior
Post by: diogenes on August 18, 2017, 11:17:30 AM
Yes i know. But how i can capture the event when i press enter after change the content of the cell?
Title: Re: grid behavior
Post by: roy_043 on August 20, 2017, 07:12:20 AM
Here is an example that may help.

I was unable to solve two issues:

Test data:
BricsCAD 16.2.15
OpenDCL 8.1.3.1
Title: Re: grid behavior
Post by: roy_043 on August 21, 2017, 12:24:07 PM
Moving the initial call to dcl-Grid-StartCellEdit from the OnInitialize event handler to the OnTimer event handler of the form solves issue #2. See attached files.

Does issue #1 perhaps only occur in BricsCAD?
Title: Re: grid behavior
Post by: roy_043 on August 22, 2017, 01:37:55 AM
Here is a new version using the dcl-GetFocus function. This version relies on fewer event handlers.

Again there seems to be an issue establishing the focus of the grid:
Title: Re: grid behavior
Post by: diogenes on September 11, 2017, 11:59:10 PM
nice solution.
thanks