OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Peter2 on May 27, 2015, 04:24:32 AM

Title: simple usage of grid
Post by: Peter2 on May 27, 2015, 04:24:32 AM
It seems that I'm totally left out in the dark - I try to create an absolute simple "data grid" with two columns and two lines, type "text", like

Code (autolisp) Select
Jim       John
Sue       Mary


But using "addString" or "AddRow" I get always an error . Maybe I missed some basis definitions / settings of the grid? maybe someone can take a look at the attached code-snippet?

Thanks
Title: Re: simple usage of grid
Post by: Fred Tomke on May 27, 2015, 12:14:29 PM
Hi, Peter2, this will work in modeless forms, but not in modal forms. Put it in the OnInitialize-event handler of the form.
I recommend you to have a look at the FAQ (http://www.opendcl.com/forum/index.php?topic=1080.0) and at the help files (http://www.opendcl.com/HelpFiles/index.php?page=Concepts/Development.htm).
Hope that helps.
Fred
Title: Re: simple usage of grid
Post by: Fred Tomke on May 27, 2015, 12:19:57 PM
Hi, I've moved around your lines a little bit. Please have a look at the odcl and the events of the form.
Regards, Fred
Title: Re: simple usage of grid
Post by: Peter2 on May 27, 2015, 02:20:09 PM
Quote from: Fred Tomke on May 27, 2015, 12:19:57 PM
...Please have a look at the odcl and the events of the form....
Oh - I see. I messed up the "OnInitialize" event in the Lisp and in the form. Thanks a lot!