Subscribe to Subscribers

Online Members

Kapil
saveed
More...

Forums » .NET » ASP.NET »

Dropdownlist blinks due to OnSelectedIndexChanged


Posted Date: 10 Aug 2012      Posted By:: nitz     Member Level: Silver    Member Rank: 1106     Points: 3   Responses: 3



The Dropdownlist has OnChange and OnSelectedIndexChanged event. So When I Click the dropdown the OnChange functionality(to disable few values) works along with the OnSelectedIndexChanged and it blinks and the dropdown needs to be clicked again to view the values. How to overcome this blinking.

Thanks in advance,
Nitz.




Responses

#683877    Author: Ajatshatru Upadhyay      Member Level: Gold      Member Rank: 17     Date: 10/Aug/2012   Rating: 2 out of 52 out of 5     Points: 3

Hi,

If you disable items of dropdown list with "onchange" event, you will have to click it again to open it. The reason is on first click it will call the function which is disabling items then the drop down will cloas itself, to get refreshed. Better disable it on body's load event or event of some other controls.

Hope it'll help you.
Regards
Ajatshatru


 
#684062    Author: nitz      Member Level: Silver      Member Rank: 1106     Date: 13/Aug/2012   Rating: 2 out of 52 out of 5     Points: 1

Hi Ajatshatru,

It just worked fine. The dropdown is in a gridview and its added dynamically bu clicking a button "Add new row". So for the first time the JS function works for the dropdown but after adding a new dropdown its not taking the new dropdown's ID and the functionality is not working. Can we've any other way to solve this?

Thank You,
Nitz.


 
#684070    Author: nitz      Member Level: Silver      Member Rank: 1106     Date: 13/Aug/2012   Rating: 2 out of 52 out of 5     Points: 1

Hi,

The Page onload functionality works fine. The mistake I did was assigned a same variable in two for loop functions.

Thank You,
Nitz.





 
Post Reply
You must Sign In to post a response.

Next : How to loop through folders in asp.net with c#
Previous : How to include stored procedure in asp.net program
Return to Discussion Forum
Post New Message
Category:

Related Messages

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2013 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.