> Hi Mr Yousfi..
>
> Until now, I always use procedural instead of Object Oriented, but after I modified the coding into procedural, I face some issues.. I don’t know how to add this method (mselectrecords()) at grid (ygrid). Because I usually just put methods inside “thisform” and also how to add these properties below at grid(ygrid)?
>
> lmultiselect = .F.
> nactiverow = 0
> nlastrow = 0
> nrecs2change = 0
>
> I am sorry for my stupidity.
>
Hi Ursula -
You can either modify the code in the examples slightly so that each grid.customProperty/Method becomes a Thisform.customProperty/Method.
Or create your own Grid class in the Class Designer, and use that one in your form instead of the base class.
The latter would work either by doing drag&drop from the Project Manager's "Classes" tab.
Or modify the existing grid's ParentClass/ClassLoc infos in the SCX table directly ("Use theForm.SCX, "Browse" in the Command Window, modify content, close the table, "Compile Form yourForm.SCX").
(You can create a dummy form first to see the pattern that you get by adding a custom class on a new form.)
I'd suggest to make backups of your current form first anyway.
hth
-Stefan