Mr. Rao, yes it is now the selected row, but the colors from ::bClrRowFocus are not shown !? Only when i click in the row this color is in use. I will display the selected row in ::bClrRowFocus-colors without using the mouse.
When you use oBrw:bClrRowFocus, you need to set oBrw:nMarqueeStyle to one of the MARQSTYLE_HIGHLROW* constants. In your case, I presume you might have set it to MARQSTYLE_HIGHLROWMS. This style puts the browse in multiselect mode. If in multiselect mode, we need to add oBrw:Select(1) also before oBrw:Refresh().
- Code: Select all Expand view
oBrw:KeyNo := <nNew>
oBrw:Select(1)
oBrw:Refresh()
If you do not really need multiselect mode for this browse, you can set oBrw:nMarqueeStyle to MARQSTYLE_HIGHLROW and still use oBrw:bClrRowFocus. In such a case multiselect mode is off and oBrw:KeyNo := <new>; oBrw:Refresh() works. ( You can also turn off multiselect mode by setting oBrw:lMultiSelect := .f., but I prefer to use MARQSTYLE_HIGHLROW)
A second question: When i use this selected row i will automatically go to the first editable col and activate it. Which way i shold go?
Though multiselect mode and inline-editing can co-exist they do not comfortably work well together.
Assuming that the browse is not in multiselect mode:
- Code: Select all Expand view
oBrw:KeyNo := <new> // or oBrw:BookMark := <new>
oBrw:Refresh()
oBrw:GoLeftMost()
oBrw:SelectedCol():Edit()
I am assuming that you enabled edit of the left most coulmn, by suitable assignment of oCol:nEditType.