C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Control Focus In WebDialog

rated by 0 users
This post has 1 Reply | 0 Followers

Not Ranked
Posts 5
melong1 Posted: Tue, Mar 10 2009 7:32 PM

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

Top 10 Contributor
Posts 1,101
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) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.