Peter,
>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.
But why not use RecordMark to indicate the row? If the triangle isn't enough indicator for you why don't you set HighlightStyle = 2?
>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?
Well, ActiveRow/Column indicates to any grid methods what row and column are currently active. So actually the grid is the only control that is self aware if it is the active control. Every other control has to compare itself to ActiveControl. ActiveRow/Column is especially necessary since it's actually the control in the column that has focus not the grid itself. We see a lot of posts of people wanting ActiveRow/Column to have meaning when the grid doesn't have focus but then it couldn't serve the purpose it does.
Let me ask you a couple of questions though about the code you posted. When does nActiveRow have a 0 value? Once the grid has gained focus will it ever be 0 again?