Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dang that grid- won't change index order
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00652648
Message ID:
00653165
Views:
45
This message has been marked as a message which has helped to the initial question of the thread.
Try moving focus off of the grid before changing the sort order and refreshing.
* index on last name
ThisForm.SomeOtherObject.SetFocus()
SELECT personel
SET order to 1
GO TOP
pplmain.tabs.browse.browseview.refresh()
Cathy


>Dear all,
>
>I created a form which contains a grid uses personel.dat as it's recordsource indexed as:
>
> USE personel.dat IN 1 SHARED ;
> INDEX c:\ppltrack\last,;
> c:\ppltrack\first,;
> c:\ppltrack\title,;
> c:\ppltrack\program,;
> c:\ppltrack\location,;
> c:\ppltrack\account,;
> c:\ppltrack\salary,;
> c:\ppltrack\city
>
>I love binding the table to the grid because the user can change records in rows and columns and the data is updated to the table immediately.
>
>However, I would like to have the user click on "Last Name" and have the grid display the data in last name order... my CLICK event (form.grid.column1.header1.click) looks like this:
>
>* index on last name
>SELECT personel
>SET order to 1
>GO TOP
>pplmain.tabs.browse.browseview.refresh()
>
>Well, nothing happens! If I halt the form and issue a standard BROWSE the data appears in the correct index order... but nothing ever changes on the form.
>
>Any ideas? Sorry if this has been asked a billion times but I couldn't find the answer...
>
>TIA!
>
>Bryan Friberg
>Adams 12 School District Webmaster
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform