Subject Re: Rowset at the end of Set
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Sat, 17 Feb 2024 11:42:56 -0800
Newsgroups dbase.getting-started

On 2/16/2024 11:21 PM, Mustansir A Ghor wrote:
> Dear Ken Sir
>
> I found the error. The datalinked field in the grid  was associated with memo type field. When I change it to entryfield type, there was no error.
>
> so now poses the issue if on the fly the grid field type can be changed?


You can, but it's simpler to sever the dataLink. I just tried it, and
sure, this will work, but it's easier to sever the datalink (the
commented out line below), and it doesn't really matter since the form
is being closed:

       if form.QTEMPSAL.rowset.count() == 0
          form.grid1.columns["COLUMN1"].editorType := 1
          //form.grid1.dataLink := null
       endif
              form.close()

Ken

--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
dBASE DOS to Windows Tutorial:
http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm