Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid's CurrentControl doesn't refresh
Message
From
10/04/2002 04:36:47
 
 
To
10/04/2002 02:34:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00643025
Message ID:
00643045
Views:
10
Carman,

Try this - changes are in bold.
With thisform.grid1
  Select MyCursor
  Go Top
 .Recordsource = 'MyCursor'
  With .Column1
    <b>
    lc_Control = IIf(cSplit='M','CmdSplit','CmdNotSplit')
   .CurrentControl = lc_control
   lc_control = Eval('.'+lc_control)
   With lc_control
       .visible = .t.
       .refresh
   endwith</b>

   .ControlSource  = 'cSplit'
   .Header1        = 'Split'
  Endwith

  With Column2
   .ControlSource  = 'cProduct'
   .Header1        = 'Product'
  Endwith
  .Refresh
Endwith
>I have 2 column of grid
>Column1 have 2 Command Button called CmdSplit, and CmdNotSplit
>Column2 has text1 = Product code value
>
>CmdSplit shows '+' for the caption
>CmdNotSplit shows '+' for the caption
>
>I append my record to cursor such as
> cSplit,Product Code
> M A001
> M A002
>
>If cSplit = 'M', Copy the current record and append to new record and cSplit value = 'C'
> Example Record:
> cSplit Product Code
> M A001
> M A002
> C A001
>
>If cSplit='M' the CmdSplit will shown else cSplit = 'C' the CmdNotSplit shown
>But it doesn't work for me
>
>I create method called showgrid
>
>With thisform.grid1
> Select MyCursor
> Go Top
> .Recordsource = 'MyCursor'
> With Column1
> .CurrentControl = IIf(cSplit='M','CmdSplit','CmdNotSplit')
> .ControlSource = 'cSplit'
> .Header1 = 'Split'
> Endw
>
> With Column2
> .ControlSource = 'cProduct'
> .Header1 = 'Product'
> Endw
> .Refresh
>Endw
>
>Thank you and coding provide will be appreciated.
>
>p/s: sorry for my english
Manoj Karki
manoj0karki@yahoo.com
Nepal
Previous
Reply
Map
View

Click here to load this message in the networking platform