DataGrid and my headache

Mark Wieder mwieder at ahsoftware.net
Thu Sep 8 00:40:50 EDT 2011


Pete-

Wednesday, September 7, 2011, 10:58:26 AM, you wrote:

> Hi Mark,
> I think the issue is that "Col 1", "Col 2", etc are just the default names
> assigned when you create a new column, nothing special about them.  When
> you *set *the dgText [ firstLineContainsColumnNames ], the datagrid expects
> the column names to be in the first line of data, so since you didn't rename
> the columns, it can't find them.  If you had "Col 1", and "Col 2" in the
> first line of data, all would have worked.

OK - got it. Setting the dgText doesn't apply names to columns, even
if firstLineContainsColumnNames is true. It *matches* the names in the
first line to already-existing names in the header and puts the data
into the matching column, if it exists. That makes some sense, and
even offers a lot of flexibility. But it certainly isn't intuitive,
and there's no way I could have gotten that from the lessons online.

-- 
-Mark Wieder
 mwieder at ahsoftware.net





More information about the Use-livecode mailing list