Help with cursor positioning

hi everyone,

i have a form (form A) which has 2 data sources (drawerTable and drawerContentsTable) and a grid for each DS

from this from i can open another form (form B) which has a grid and some filter parameters, the grid shows the result of the query based on the filters.

when i double click on a row in the grid i want the first form (form A) to set the cursors in the 2 grids for the correct drawerTable and drawerContentsTable rows

here is my code:

formB doubleClick:

public int mouseDblClick(int _x, int _y, int _button, boolean _Ctrl, boolean _Shift)
{
int ret;
Object caller;
;
ret = super(_x, _y, _button, _Ctrl, _Shift);

caller = element.args().caller();
if (caller
&& classidget(caller) == classnum(SysSetupFormRun)
&& formHasMethod(caller, identifierstr(SomethingWasHappend)))
{
caller.SomethingWasHappend(psgDrawerContentsTable.Drawer, psgDrawerContentsTable.RecId);
}
element.close();
return ret;
}

Form A SomethingWasHappend method:

void SomethingWasHappend(psgDrawer _drawer, RecId _recId)
{
;

psgDrawerTable_ds.findValue(fieldnum(psgDrawerTable, drawer), int2Str(_drawer));
psgDrawerContentsTable_ds.(fieldnum(psgDrawerContentsTable, recid), int642str(_recid));
}

my problem is that the first DrawerTable DS selects the correct row

but the second ds (DrawerContentsTable) selects always the first row …

i have tried using refresh setcursor and it wont work

any help would be appreciated!

Hi, try with this,

Override method firstField on a form, and call after super method setFocus of a control which should focused after form is opened. Example:

    public void firstField(int _flags=1)
    {
        ;
        super(_flags);
        MyControlName.setFocus();
    }

thanks valeru ,

solved it by calling the second findvalue method in the execute qurey method of the second DS.

I have a explained solution here http://www.dynamicsaxlatino.com/ubicar-cursor-sobre-cuadricula-al-actualizar/