>Can sombody give me some advice please. I have a cursor 'Articolhang' which is built when the the form is initialized. I would like to bind the contents of the cursor to my grid using the traditional way by selecting the grid and then entering my properties using the foxpro GUI i.e. columns = 3, recordsource = Articolhang.
>
>Here lies a problem I think when the form initializes the grid is looking for the cursor but the cursor is not built yet. Can i do it this way or after my method which creates the cursor I then have to to do something like:
>
>
>
>with this.grid1
> .recordsource = 'Articolhang'
> etc etc
>endwith
>
>
>
>I would really like to set the properties on the grid rather than programmatically!!
>
>I was hoping somebody could put me in the right direction
>
>Many thanks
There are two general ways of doing it.
1. You need to create your cursor in the Load event of the form. When you requery your database, select into temp cursor, zap the original [main cursor] and append into it.
2. Create your grid as a separate class. Add it in the Init of the form after you already got your cursor.
I use both methods in my forms.
If it's not broken, fix it until it is.
My Blog