﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebDesktop - WebDialogBox Focus issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialogBox-Focus-issue/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>WebDialogBox Focus issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialogBox-Focus-issue/</link><pubDate>Mon, 03 Jan 2011 02:07:50 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><category>WebGrid</category><category>WebdialogBox</category><category>focus</category><category>hasfocus</category><description>&lt;p&gt;Hello Frank,&lt;/p&gt;&lt;blockquote style="padding-left: 10px; margin: 0px 0px 0px 5px; border-left: 1px solid rgb(204, 204, 204);"&gt;&lt;span style="color: rgb(63, 63, 63); font-family: 'segoe ui',arial,verdana,tahoma; font-size: 12px; line-height: 18px;"&gt;when the grid2 has focus,&amp;nbsp;I&amp;nbsp;can&amp;nbsp;close&amp;nbsp;WebDialogBox by the way&amp;nbsp;,but when the focus is&amp;nbsp; on WebDialogBox&amp;nbsp; not on grid2 ,I press 'Esc',it&amp;nbsp; can not close WebDialogBox&amp;nbsp;&amp;nbsp;.You can have a&amp;nbsp;try.&lt;/span&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="color: rgb(63, 63, 63); font-family: 'segoe ui',arial,verdana,tahoma; font-size: 12px; line-height: 18px;"&gt;I think you missunderstood about our WebDialogBox control. Event though you can focus WebDialogBox, it does not mean that you can close WebDialogBox by pressing 'ESC'.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(63, 63, 63); font-family: 'segoe ui',arial,verdana,tahoma; font-size: 12px; line-height: 18px;"&gt;Example:&lt;br /&gt;You do not need to focus another control. Just Load WebDialogBox at page load and press 'ESC'. Notice that, It will not close WebDialogBox.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(63, 63, 63); font-family: 'segoe ui',arial,verdana,tahoma; font-size: 12px; line-height: 18px;"&gt;Unfortunately, WebDialogBox also doesn't have this feature. However, I have a workaround which can help you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(63, 63, 63); font-family: 'segoe ui',arial,verdana,tahoma; font-size: 12px; line-height: 18px;"&gt;I add listener onkeydown for WebDialog's div global from OnCreated clientside event. During the focus in its div, we can validate your scenario.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(63, 63, 63); font-family: 'segoe ui',arial,verdana,tahoma; font-size: 12px; line-height: 18px;" /&gt;&lt;/p&gt;&lt;pre&gt;     function Created() {
            var el = document.getElementById("dvWnd_Global_wndWebDialogBox1");
            Listener.Add(el, "onkeydown", keyDown);
        }
        function keyDown() {
            var dlg = ISGetObject("WebDialogBox1");
            if (event.keyCode == 27) {
                dlg.CloseDialog();
            }
        }
        function Button1_onclick() {
            var dlg = ISGetObject("WebDialogBox1");
            var el = document.getElementById("dvWnd_Global_wndWebDialogBox1");
            el.focus();
        }&lt;/pre&gt;
&lt;p&gt; Hope this helps.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;

</description></item><item><title>WebDialogBox Focus issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialogBox-Focus-issue/</link><pubDate>Fri, 31 Dec 2010 00:11:40 GMT</pubDate><dc:creator>qq397472251</dc:creator><category>WebGrid</category><category>WebdialogBox</category><category>focus</category><category>hasfocus</category><description>&lt;p&gt;webdiaog.&lt;strong&gt;SetFocus()????&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>WebDialogBox Focus issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialogBox-Focus-issue/</link><pubDate>Fri, 31 Dec 2010 00:10:54 GMT</pubDate><dc:creator>qq397472251</dc:creator><category>WebGrid</category><category>WebdialogBox</category><category>focus</category><category>hasfocus</category><description>&lt;p&gt;For Example:&lt;br /&gt;First,the WebDialogBox (Not modal) has displayed on the page,then I put focus to other controls,last I click a button,I wish the   WebDialogBox  has got focus. &lt;br /&gt;how to achieve it?&lt;/p&gt;</description></item><item><title>WebDialogBox Focus issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialogBox-Focus-issue/</link><pubDate>Thu, 30 Dec 2010 02:09:05 GMT</pubDate><dc:creator>niven</dc:creator><category>WebGrid</category><category>WebdialogBox</category><category>focus</category><category>hasfocus</category><description>&lt;p /&gt;&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;Hi Frank,&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;Even if I remove the following code the WebDialogBox still closing properly.&lt;/p&gt;
&lt;div&gt;&lt;span style="font-family: 'courier new', tahoma; font-size: 12px; color: rgb(63, 63, 63); line-height: 18px; white-space: pre-wrap; "&gt;    if (grid2.HasFocus() == true) {  &lt;/span&gt;&lt;/div&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; " /&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;Please make sure that you get the latest build on your project.&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;We do have a &lt;b&gt;SetFocus&amp;nbsp;&lt;/b&gt;method for WebDialogBox.&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;Niven.&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style="margin-top: 10px; margin-bottom: 10px; "&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>WebDialogBox Focus issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialogBox-Focus-issue/</link><pubDate>Wed, 29 Dec 2010 21:28:56 GMT</pubDate><dc:creator>qq397472251</dc:creator><category>WebGrid</category><category>WebdialogBox</category><category>focus</category><category>hasfocus</category><description>&lt;p&gt;when the grid2 has focus, I can close WebDialogBox by the way ,but when the focus is  on WebDialogBox  not on grid2 ,I press 'Esc',it  can not close WebDialogBox  .You can have a try.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So I want you give me a focus way for WebDialogBox .&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>WebDialogBox Focus issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialogBox-Focus-issue/</link><pubDate>Wed, 29 Dec 2010 00:02:16 GMT</pubDate><dc:creator>niven</dc:creator><category>WebGrid</category><category>WebdialogBox</category><category>focus</category><category>hasfocus</category><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Unfortunately WebDialogBox does not have HasFocus method.&lt;/p&gt;
&lt;p&gt;I have tried your sample on my side. everythings went right. It can close nicely, I even tried several times.&lt;/p&gt;
&lt;p&gt;Please tell me kind of error did you get.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Niven.&lt;/p&gt;</description></item><item><title>WebDialogBox Focus issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialogBox-Focus-issue/</link><pubDate>Tue, 28 Dec 2010 21:47:09 GMT</pubDate><dc:creator>qq397472251</dc:creator><category>WebGrid</category><category>WebdialogBox</category><category>focus</category><category>hasfocus</category><description>&lt;p&gt;Anyone can help me?thanks!&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>WebDialogBox Focus issue</title><link>http://www.intersoftsolutions.com/Community/WebDesktop/WebDialogBox-Focus-issue/</link><pubDate>Tue, 28 Dec 2010 00:59:02 GMT</pubDate><dc:creator>qq397472251</dc:creator><category>WebGrid</category><category>WebdialogBox</category><category>focus</category><category>hasfocus</category><description>&lt;p&gt;I write a js Funtion On page.When press 'Esc' key ,it call 'closeDialog()',then Close 'WebDialogBox1'.&lt;br /&gt;&lt;strong&gt;But how I judge that 'WebDialogBox1' &lt;span style="color: #419d04"&gt;whether or not&lt;/span&gt;&amp;nbsp;&amp;nbsp; to has focus????&lt;br /&gt;&lt;/strong&gt;(like webgrid'S way grid.HasFocus() )&lt;br /&gt;Anyone can help me?thanks!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body onkeydown="buyShortKey()"&amp;gt;&lt;br /&gt;function buyShortKey() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (event.keyCode == 27) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; closeDialog();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/strong&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style="color: #ff0000"&gt;&lt;br /&gt;//&lt;/span&gt;&lt;strong&gt;&lt;span style="color: #ff0000"&gt;Close WebDialogBox1&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt; &lt;br /&gt;function closeDialog() {
    var grid2 = ISGetObject("WebGrid2");
    var grid1 = ISGetObject("WebGrid1");   
    if (grid2.HasFocus() == true) {  
        var dlgBoxAbout = ISGetObject("WebDialogBox1");
        dlgBoxAbout.CloseDialog();
        grid1.SetFocus();
        grid1.RootTable.GetRow(0).Select();
        var goCell = grid1.RootTable.GetRow(0).GetCell('tradecode');
        goCell.ActivateEdit();
         }

}&lt;/pre&gt;&lt;span style="background-color: #fffce1; font-family: courier new"&gt;&lt;/span&gt;</description></item></channel></rss>