Control Focus In WebDialog

Legacy

A description has not yet been added to this group.

Control Focus In WebDialog

  • rated by 0 users
  • This post has 1 Reply |
  • 0 Followers
  • Hello,

    I'm using a button to load a webdialog.  This works great using the code I've seen on this forum.  Now I want to set the focus to a control on the dialog when it loads.  However, I can't seem to get it to work.  Any suggestions?

    Also, how do you make a WebTopicBarGroup scroll?  I've tried everything and I'm getting frustrated.  I see that there is a C1WebScrollableGroup but how do you make the topic bar use it?

    Again, sorry if this has been covered but I've looked everywhere and can't seem to find any solutions.

    ASP.NET

    VB.NET

  • Hi,
     

    You need to use C1WebDialog.OnClientShown client-side event.
     
    Suppose there is a textbox with ID set to "TextBox2" in C1WebDialog, which we'd like to focus on when a dialog
    is shown:
     

    <script type="text/javascript">
      function C1WebDialog1_OnClientShown(sender, e)
      {
         $get("TextBox2").focus();
      }
    </script>
     
    <c1d:C1WebDialog ... OnClientShown="C1WebDialog1_OnClientShown" ....>
    ...
    </c1d:C1WebDialog>
     
    Regards,
    Sergey.
    <melong1> wrote: news:215208@10.0.1.98...

    Hello,

    I'm using a button to load a webdialog.  This works great using the code I've seen on this forum.  Now I want to set the focus to a control on the dialog when it loads.  However, I can't seem to get it to work.  Any suggestions?

    Also, how do you make a WebTopicBarGroup scroll?  I've tried everything and I'm getting frustrated.  I see that there is a C1WebScrollableGroup but how do you make the topic bar use it?

    Again, sorry if this has been covered but I've looked everywhere and can't seem to find any solutions.

    ASP.NET

    VB.NET



    http://helpcentral.componentone.com/cs/forums/p/78475/215208.aspx#215208

Page 1 of 1 (2 items)