client-side javascript mixed with postback

R

rodchar

hey all,
imagine this for a moment if you will:
i have a row in a gridview that when it is in edit mode there is a column
that contains a dropdownlist and 2nd column that contains a user control. The
user control is basically a date field. Itl has a button which toggles a
calendar's visibility that is also inside the user control.

in the rowdatabound event depending on the value that is bound to the
dropdownlist i enable or disable the date user control.

i have some client-side javascript for the onchange event of the
dropdownlist which again depending on the value selected in the dropdownlist
will disable or enable the date user control.

let's say i go to edit a row in the gridview and the value in the
dropdownlist causes the date user control to be disabled initially as a
result of the rowdatabound event. ok, so i change the dropdownlist value to
something that i know will enable it which will be done thru the onchange
event and javascript as mentioned above. Everything is working fine to this
point.

now i understand there are ajax calendars out there that will solve this
problem in a flash (or should i say in a silverlight) but this is one of my
constraints having to use this existing date user control. the calendar
button does a postback to toggle the calendar's visibility.

so now i click the calendar button to display the calendar, can you guess
what happens to the date user control? it immediately becomes disabled. can
someone please tell me why this is (i have an idea...i'm guessing viewstate)
and some workarounds.

hope this is clear.

thanks,
rodchar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top