| Subject |
Re: Derive grid's fieldName |
| From |
Andy Taylor <andy.taylor.1959@outlook.com> |
| Date |
Sun, 24 Oct 2021 19:59:21 -0400 |
| Newsgroups |
dbase.getting-started |
Tom,
Akshat almost had it with form.grdList.columns["Column1"].datalink but that, as he points out, is seen by dBASE an object reference
rather than a string. I investigated and found that it actually points to the fields object in the rowset, so the following is what you need:
? form.grdList.columns["Column1"].datalink.fieldname
Your next task will be how to find the column number when the user clicks on a particular cell in the grid...
It's late in the UK so I'm off to bed. :-)
Andy
> dBase 2019
> Windows 10
>
> Hi all,
>
> I am trying to derive the table field name that my grid column is
> attached to via program. That would be the word 'testdate' in the
> following example.The method escapes me at the moment. Your help would
> be appreciated.
>
> columns["Column1"] = new GRIDCOLUMN(form.GRID1)
> with (columns["Column1"])
> dataLink = form.qdata.rowset.fields["testdate"]
> editorType = 1 // EntryField
> width = 90.0
> endwith
>
> Thanks,
> Tom
|
|