<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Set focus on a property in a relationship grid</title><link>https://www.aras.com/community/f/development/37548/set-focus-on-a-property-in-a-relationship-grid</link><description>Hello, 
 I have method attached to OnEditFinish of the property sort_order of the Part BOM relationship. The goal is to check if the property is filled and if no, to throw an error. After the display of the error, I want to set back the focus to the property</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>RE: Set focus on a property in a relationship grid</title><link>https://www.aras.com/community/thread/8681?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2022 08:13:36 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:a69a10cb-d310-4e35-bb9e-ec694cd83921</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Hi Skoleva,&lt;/p&gt;
&lt;p&gt;that&amp;acute;s a good question! But there are not many samples regarding this one. To be honest, I don&amp;acute;t know a single one.&lt;/p&gt;
&lt;p&gt;In regular Forms settings the focus to certain fields is pretty easy. But relationship grids are a bit different.&lt;/p&gt;
&lt;p&gt;You are correct that you have to use gridApplet. There are some focus related functions, but I never tried them by myself and don&amp;acute;t know the variables that are required for the functions.&lt;/p&gt;
&lt;p&gt;gridApplet should support these two functions:&lt;/p&gt;
&lt;p&gt;- &amp;quot;&lt;span&gt;editCell&amp;quot;&amp;nbsp; - moves focus to cell and switch it to the editable mode.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;- &amp;quot;requestFocus&amp;quot; -&amp;nbsp; sets input focus to the control.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I don&amp;acute;t have any samples, but I would try something like this:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;var g = gridApplet;&lt;br /&gt;g.&lt;strong&gt;requestFocus(relationshipID, colIndex);&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OR&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span&gt;g.&lt;/span&gt;requestFocus(colIndex);&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OR&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;g.editCell(relationshipID, colIndex)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Angela&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>