David,
I don't like the idea of deleting a record that is not highlighted, so the deletebutton is not enabled unless there is a lit row. Also, set deleted is off, therefore visible until saved, and deleted records are in different color. I purposely choose not to to use the delete-mark.
I know it's designed that way, that's exactly what I'm bitching about <g>
I mean, what's the point of the grid having the focus? Please correct me if I'm wrong, but if one's moving around in it or editing, it's always a cell that, i.e. a textbox, checkbox or whatever, that has the focus, right?
Anyway, I finally got it to work.
THIS.nActiveRow = THIS.ACTIVEROW
THIS.PARENT._grid1.SETFOCUS
IF THIS.PARENT._grid1.nActiveRow <> 0
SELECT SoSInvoice
DELETE
THIS.PARENT._grid1.REFRESH
ENDIF
Thank's for your help, all of you.
BR
Peter
>Peter,
>
>Why don't you simply delete the record?
>
>
>delete in TheAlias
>skip 1
>this.parent.Refresh()
>
>
>>Why the grid has to have the focus in order to determine the activerow is quite beyond me, but that's another matter.
>
>That's the way it's designed, ActiveRow only has a value while the grid is the active control (ie has focus).
Peter Pirker
Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?
(Woody Allen)