simple usage of grid

Started by Peter2, May 27, 2015, 04:24:32 AM

Previous topic - Next topic

Peter2

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
Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10

Fred Tomke

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 and at the help files.
Hope that helps.
Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Fred Tomke

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Peter2

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!

Peter
ODCL 8.1.... German, AutoCAD 2017 - 2018, Win 7 x64, Win 10