473,414 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Focus in a dropdownlist

Hi,

I've done a function to put the focus in a dropdownlist and I've realise
that I have to click two times to display the items.

Do anyone know why??
Feb 19 '07 #1
4 2506
On Feb 19, 9:04 am, "Gorka" <g...@gabiges.comwrote:
Hi,

I've done a function to put the focus in a dropdownlist and I've realise
that I have to click two times to display the items.

Do anyone know why??
because of the coding I guess

Check where do you bind your data. It looks like you don't bind the
dropdownlist on Page_Load

Feb 19 '07 #2
I think yes. The dropdownlist is binded on the page load, I say, before I
click the dropdownlist the dropdownlist is full of listitems.

Thanks for all.

"Alexey Smirnov" <al************@gmail.comwrote in message
news:11*********************@s48g2000cws.googlegro ups.com...
On Feb 19, 9:04 am, "Gorka" <g...@gabiges.comwrote:
>Hi,

I've done a function to put the focus in a dropdownlist and I've realise
that I have to click two times to display the items.

Do anyone know why??

because of the coding I guess

Check where do you bind your data. It looks like you don't bind the
dropdownlist on Page_Load

Feb 20 '07 #3
On Feb 20, 9:14 am, "Gorka" <g...@gabiges.comwrote:
I think yes. The dropdownlist is binded on the page load, I say, before I
click the dropdownlist the dropdownlist is full of listitems.
you said you have to click two times to display the items.

Can you post here the code (for the dropdown and actions related to
it)?

Feb 20 '07 #4
Ok,

I'm working in VS2005. And I'm using Atlas.

The dropdownlist is binded directly to a ObjectDataSource, this is binded to
a Entity than takes data from de DataBase.

And the General Function that I use to write the javascrit functions in all
the controls is:

Private Function SetOnOFControl(ByRef objLinea As Object, ByVal
nombreControl As String, _

Optional ByVal estilo As String = "etiquetaValue", Optional ByVal estiloSel
As String = "etiquetaValueSel") As Boolean

Try

CType(objLinea.FindControl(nombreControl), Object).CssClass = estilo

CType(objLinea.FindControl(nombreControl),
Object).Attributes.Add("onfocus", "this.className='" & estiloSel & "'")

CType(objLinea.FindControl(nombreControl),
Object).Attributes.Add("onblur", "this.className='" & estilo & "'")

Return True

Catch ex As Exception

Return False

End Try

End Function

Private Function SetOnOfControlesGV(ByRef gvRow As GridViewRow) As Boolean

flagresp = SetOnOFControl(gvRow, "ddlGrupo")

Return True

End Function

Thanks.

"Alexey Smirnov" <al************@gmail.comwrote in message
news:11*********************@v45g2000cwv.googlegro ups.com...
On Feb 20, 9:14 am, "Gorka" <g...@gabiges.comwrote:
>I think yes. The dropdownlist is binded on the page load, I say, before I
click the dropdownlist the dropdownlist is full of listitems.

you said you have to click two times to display the items.

Can you post here the code (for the dropdown and actions related to
it)?

Feb 20 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Remco Groot Beumer | last post by:
Hello, I would like to know if it is possible in ASP.NET to set the focus to a control. I would like to make it possible for users to fill in a form. The form contains textboxes and...
2
by: starbuck | last post by:
Hi In asp.net/vb.net is there a trigger for a dropdown list when focus moves to next control. I want other fields to be filled after a user selects a account reference and tabs to the next...
4
by: Christian Ista | last post by:
Hello, I have 2 questions : 1. On an ASP.NET page I have several controls (5 TextBox, 1 Dropdown and 1 button) Only the dropdown is AutoPostBack = true, the TextBox are SingleLine When I...
4
by: PK9 | last post by:
I have a button at the top of my page that I have an onClick event handler for which makes some new controls (at the bottom of my page) visible. When the user clicks the button I make the new...
2
by: jason | last post by:
Hello and Good Day. REALLY LOST. Running ASP.NET 1.1 Becuase I think I'm using my own controls smartnavigation does not appear to work for me. Stardard issue: I've got a datagrid thats...
3
by: vivela | last post by:
hi, I hope you could help me out on this one,cause I have been trying for 4 days to solve it,but couldn't quite get it right: I have an ASP textbox that should change the value in a dropdownlist....
0
by: RBM007 | last post by:
Hello, I have created webpages in the atlas standard. To help my users, I automaticaly focus to the first editable control which is in a GridView kind control. Every gridview is placed in a...
1
by: =?Utf-8?B?VmljdG9yaW91czE=?= | last post by:
I am usingVB with .net 1.1 and I wish to set focus to a textbox after the autopostback event of a dropdownlist. When the user changes the selection of my dropdownlist an onchange event occurs and...
4
by: pablorp80 | last post by:
Hello, Here is what I need: I need the focus and the cursor set to a textbox named txtGT, every time no matter if it is the first page load or whether it is a postback. Here is the problem: I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.