After binding the source data to the Webcombo, I am unable to set the input cursor in the text portion of the control. The control's editable property is set to 'True.' The contol's Focus() method has no effect. I will assume that one should use the client side InitializeCombo event to do this. My intent is to have the input cursor immediately available so the user does not have to tab into or mouse click into the text field in order to edit. If the solution is to use javascript in the InitializeCombo event, please provide an example of the script. Thank you.
Hi, Just wanted to post a follow-up to let the group know that the solutions posted above did work succesfully for me on all the pages where I would like the initial focus to be set to a WebComboBox. Thanks! Chuck
007chuck said:I am a bit lost on where this issue stands...I also have the same problem. In the Page_Load event of my VB code behind file for the web page that has a WebCombo control, I call the following method: WebCombo1.Focus() This does not work for WebCombo controls, but works fine for all other controls. Is there a different way to do this in the server-side code that I am missing or do I have to use client-side code? I am trying to avoid as much client-side code as possible (which is why I purchased the Infragistics NetAdvantage suite in the first place). Thanks, Chuck
WebCombo1.Focus()
This does not work for WebCombo controls, but works fine for all other controls. Is there a different way to do this in the server-side code that I am missing or do I have to use client-side code? I am trying to avoid as much client-side code as possible (which is why I purchased the Infragistics NetAdvantage suite in the first place). Thanks, Chuck
Our ASP.NET controls provide a lot of rich and detailed functionality, but there are a number of things that require writing client-side code to do.
I posted the question on setting input focus on the Webcombo and received a quick and helpful response. I am new to this forum and I should have acknowledged further, that the following code worked for me (mjshimon2004):
<body onload="OnLoadPage()">
function OnLoadPage(){ webCombo = igcmbo_getComboById("<% =wcCustomers.ClientID %>"); webCombo.focus();}
But as you (007chuck) point out, why do I need to use javascript in the firstplace. That would be my question too.
I am a bit lost on where this issue stands...I also have the same problem. In the Page_Load event of my VB code behind file for the web page that has a WebCombo control, I call the following method:
With much sincerity I thank you for your help.