element.selectedControl() dont work correctly

Hello,

In the Form “CompanyInfo” you find a form with the method “fileNameLookupInitialPath”. By clicking the file-symbol dynamics read the text in the stringedit and split into filiepath, filename and filetype. By setting the debugger you can see that dynamics get the right value in the stringedit field.

Now i copied the code to own created form. The only difference is, that i want to read values from a grid. By clicking in the grid the file-symbol displays and i can click on it. When i switch on the debugger i see that dynamics get anoter values from another rows in the grid. When i click a upper entry in the grid dynamics take a random one. When i click another row dynamics do the same.

Hope for help and thank you!

Please show us your code.
By the way, how is it related to element.selectedControl(), which you consider broken?