Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Basic Entry Form with Grid
Message
From
31/07/1997 09:34:46
Juan Kh
Dataprop Technologies
Sungai Petani, Malaysia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00042536
Message ID:
00042598
Views:
35
>>Hi all,
>>
>>I have this form with a grid at the bottom portion of the form showing the records added to the form. (read only) The problem I have is the grid shows the records added FIFO manner and does not follows the index. Only way I can reorder this grid is to click the scroll bar beside the grid. Anyway to rectify this? Thanks.
>>
>>Regards,
>>Farouk Yew
>
>Farouk what is the record source for the grid - a child table, a view, all the records with the highlighted record being edited ???
>
>Are you referring to records you are adding on the top half of the form? If so then the problem looks like getting the grid to refresh correctly as the records are added. If not, and the grid is appearing on the screen with records in the wrong order, check your indexes both in the data environment and as you are setting up the grid.
>
>Hope this gives you some ideas.
>Barbara

Hi there,

Try check your underlying recordsource, make sure you have controlling index on the cursor. If your grid's record source is a SQL cursor, try to index it by issuing "Index on XXX Tag XXX".

Should look like this:

SELECT myField,OtherFields FROM Table1 INTO CURSOR myCursor
Index On myField Tag myField


I had a grid with a SQL cursor with index (descending), when I "APPEND BLANK" at the end of the grid, the new record is automatically reposition to the top (because the field I indexed is now BLANK). You need to call the Refresh Method of the Form right after you APPENDed the record.

Hope this will work for you.

Note: There is an article in VFUG Tips and Tricks section on how to index your view/cursor.

Regards,
juan
Previous
Reply
Map
View

Click here to load this message in the networking platform