Subject Re: Column Sequence in Grid
From Ken Mayer <>
Date Mon, 19 Sep 2022 10:50:24 -0700
Newsgroups dbase.getting-started

On 9/19/2022 1:34 AM, Milind Nighojkar wrote:
> Can we play with code..?
> example of code...
>    columns["COLUMN2"] = new GRIDCOLUMN(form.GRID1)
>        with (columns["COLUMN2"])
>           dataLink = form.employees1.rowset.fields["doj"]
>           editorType = 1        // EntryField
>           width = 12.4286
>        endwith
> here can we pass variables for ["COLUMN2"]   and ["doj"]

As Akshat notes, grids are tough to work with programmatically. Part of
the reason is that they aren't just a single component. They are a
container component for the columns, which contain editorControls and
headingControls, and you have to address each of them specifically.

I seriously recommend, as Akshat does, that you use the designer. I
spent some time looking at the concept of just trying to read the
current grid layout if a column is moved by a user, for example, and
there doesn't seem to be a way to do that, at least that I can see. Or
not without some huge amount of work (just reading the array of columns
returns the default layout when the form opened).

It's not hard in the designer to define the columns, which as noted
earlier in this thread, I sent you instructions for in email.


*Ken Mayer*
Ken's dBASE Page:
The dUFLP:
dBASE Books:
dBASE Tutorial:
dBASE Web Tutorial:
dBASE DOS to Windows Tutorial: