Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cant Refresh Grid Column
Message
From
20/09/1999 08:19:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00266613
Message ID:
00266637
Views:
22
>I am trying to rfresh a Grid Column and cant get it to work. Scenarios as follows:
>
>1. I have a number of colums in a Grid
>2. When I go into each column, I want the whole Grid to change sequence and be ordered by the tag linked to the column
>(i.e. the sequence should change but I want to stay on the same record)
>
>I have following code in th GOTFOCUS.
>
>lnREC=RECNO()
>set order to MYTAG
>GOTO lnRec
>
>I then tried the following with no success :-
>this.parent.parent.refresh ---> Doesent work
>thisform.refresh ---> Doesent work
>
>
>Any help appreciated.
>
>Regards,
>
>Gerard


Gerard,
Following code from a custom header click that works :
WITH this.parent.parent
  IF !empty(this.parent.myTextBox.tagname)
    SET order to tag (this.parent.myTextBox.tagname) ;
      in (.recordsource)
  ELSE
    SET order to 0 in (.recordsource)
  ENDIF
  lnTempCurrec = recno(.recordsource)
  .refresh
  IF between(lnTempCurrec,1,reccount(.recordsource))
<del>    GO nTempCurrec in (.recordsource)</del>
    GO lnTempCurrec in (.recordsource)
  ENDIF
ENDWITH
Here pls note that I also used a subclassed textbox (myTextBox) which holds its relevant tagname property. Yes, I know it's strange code :)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform