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