Inserting a column

Started by nivuahc, October 13, 2011, 07:46:21 AM

Previous topic - Next topic

nivuahc

I've just started using OpenDCL so forgive me if my question seems simplistic or elementary.

I've created a Grid for a project that I'm trying to put together and, after much work and trial and error, I've finally gotten it to do what I want. So imagine my frustration when I realized that I was missing a column that should have been there all along! Unfortunately, I have 13 columns right now and my missing column should be in index position 5.

Other than re-naming/modifying all of the existing columns is there a way to insert a column in an existing grid control?

nivuahc

After some more investigation I realize that I can dynamically insert a column using the Grid_InsertColumn method via lisp but I'm specifically wondering about doing this in the Studio Editor.

So that begs the question... is it generally accepted to be better to create my columns dynamically via lisp and just put the control in place with the Studio Editor? If I dynamically create my columns, it seems likely that I'll want to calculate my control and form size dynamically as well... is this also generally accepted as the better option?

owenwengerd

I think it's generally better to define as much as possible at design-time in the IDE.  In this case you could insert your column via lisp, then use dcl_Project_SaveAs to save the updated file for further editing in the IDE.
Owen Wengerd (Outside The Box) / ManuSoft

nivuahc

Thanks, Owen!

For everything.