Subject Re: Conditional edit of a record in a grid
From Milind NIghojkar <milinigh@yahoo.com>
Date Thu, 14 Oct 2021 13:42:17 -0400
Newsgroups dbase.getting-started

Hello Vaisle,
Thanks, It worked..
Regards
Milind Nighojkar

Buză Vasile Wrote:

>
>
> "Buză Vasile"  wrote in message news:9O5iNt2vXHA.1636@ip-AC1E04A7...
>
> >"Milind Nighojkar"  wrote in message news:UkVybhsvXHA.1640@ip-AC1E04A7...
> >
> >Scenerio :
> >form has a grid using a single table. Want to limit editing to recno 1.
> >How I can I do that?
> >Any suggestions?
> >Can somebody share a sample code?
> >Regards
> >Milind Nighojkar
>
> Hi Milind,
>
> You can use:
>
> Query.Rowset.OnNavigate = { ; this.CanEdit := iif( this.atFirst(), null, {||
> false} )  }
>
> or simpler
>
> Query.Rowset.canEdit = {|| this.atFirst() }
>
> Example in attachment.
>
> Vasile
>