473,499 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can you tell if a (Calendar) WebControl has focus

I have a page that has multiple calendars on it and sync off of the DayRendered event
on each control. My problem is that if a user clicks on one calendar, it causes a
refresh and kicks off all the DayRendered events on my page. I want to ignore that
if event if the keyclick wasn't on my custom calendar. Is there a way to get which
control has the focus? From what I read the only way is through JavaScript????

BTW, I can't use the SelectionChanged event because I could have situations where
the user could click on the same date twice....

Nov 19 '05 #1
3 1464
I understand your question, but not why SelectionChanged won't work...it
seems to be just what you need, right? If the date doesn't change, then why
update the other calendars?

--

Joshua Mitts
jo****@msn.com

"Peter" <pe***@nospamerino.com> wrote in message
news:JN********************@comcast.com...
I have a page that has multiple calendars on it and sync off of the
DayRendered event
on each control. My problem is that if a user clicks on one calendar, it
causes a
refresh and kicks off all the DayRendered events on my page. I want to
ignore that
if event if the keyclick wasn't on my custom calendar. Is there a way to get
which
control has the focus? From what I read the only way is through
JavaScript????

BTW, I can't use the SelectionChanged event because I could have situations
where
the user could click on the same date twice....
Nov 19 '05 #2

I had the same thought but as you know the SelectionChanged event won't get
called
if you click on the same date. So that's why I am using the DayRendered
event.
The reason I want to monitor whether a user clicks on the same date
consecutively
is that I highlight/select the date on alternating clicks (like an on off
switch). This way
they can have the ability to select or deselect the usage of the date. The
fly in the
ointment is when I have multiple calendars on the same page and the
selection of a
date causes a reload which kicks off all the DayRendered events for all the
calendars
on the page.... Is there anyway to know what control caused the page reload?
Perhaps when page_load gets called I can somehow at that point store in a
session
variable the UniqueID of the control????
"Joshua Mitts" <jo****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I understand your question, but not why SelectionChanged won't work...it
seems to be just what you need, right? If the date doesn't change, then why
update the other calendars?

--

Joshua Mitts
jo****@msn.com

"Peter" <pe***@nospamerino.com> wrote in message
news:JN********************@comcast.com...
I have a page that has multiple calendars on it and sync off of the
DayRendered event
on each control. My problem is that if a user clicks on one calendar, it
causes a
refresh and kicks off all the DayRendered events on my page. I want to
ignore that
if event if the keyclick wasn't on my custom calendar. Is there a way to
get which
control has the focus? From what I read the only way is through
JavaScript????

BTW, I can't use the SelectionChanged event because I could have
situations where
the user could click on the same date twice....

Nov 19 '05 #3
Check out this page, it may give you what you need:

http://www.eggheadcafe.com/articles/20050609.asp

--

Joshua Mitts
jo****@msn.com

"Peter" <pe***@nospamerino.com> wrote in message
news:SY******************************@comcast.com. ..

I had the same thought but as you know the SelectionChanged event won't
get called
if you click on the same date. So that's why I am using the DayRendered
event.
The reason I want to monitor whether a user clicks on the same date
consecutively
is that I highlight/select the date on alternating clicks (like an on off
switch). This way
they can have the ability to select or deselect the usage of the date. The
fly in the
ointment is when I have multiple calendars on the same page and the
selection of a
date causes a reload which kicks off all the DayRendered events for all
the calendars
on the page.... Is there anyway to know what control caused the page
reload?
Perhaps when page_load gets called I can somehow at that point store in a
session
variable the UniqueID of the control????
"Joshua Mitts" <jo****@msn.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
I understand your question, but not why SelectionChanged won't work...it
seems to be just what you need, right? If the date doesn't change, then
why update the other calendars?

--

Joshua Mitts
jo****@msn.com

"Peter" <pe***@nospamerino.com> wrote in message
news:JN********************@comcast.com...
I have a page that has multiple calendars on it and sync off of the
DayRendered event
on each control. My problem is that if a user clicks on one calendar, it
causes a
refresh and kicks off all the DayRendered events on my page. I want to
ignore that
if event if the keyclick wasn't on my custom calendar. Is there a way to
get which
control has the focus? From what I read the only way is through
JavaScript????

BTW, I can't use the SelectionChanged event because I could have
situations where
the user could click on the same date twice....


Nov 19 '05 #4

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

Similar topics

6
516
by: Mason | last post by:
I have a quick, probably easy, question about Lebans' calendar program. I have a form that allows a user to click on different technicians. When this happens, Lebans' calendar comes up with...
1
7253
by: jim_parent_804 | last post by:
Good morning: I created a data entry form that has been working well, and needed to redesign it. The form is called, and now the first field to be filled in is a date using the MSCAL.Calendar.7...
16
3035
by: DFS | last post by:
If you're listening, I want the middle of the calendar (showing 1 month) to open below the cursor position. It currently opens just to the right and below the cursor position. I hunted through...
2
1055
by: Mark | last post by:
Hi all, I have a calendar webcontrol on one of my forms. I want to be able to restore the date when a user logs back in and goes to the page with the calendar on it. I just get the date out of...
3
3592
by: Shevek | last post by:
Hi All, Hope someone can help! I am building an Event Calendar app based around the Calendar WebControl which builds an SQL string based on the SelectedDates property which is passed to...
1
2258
by: Peter | last post by:
I have a dilemna. Currently I have created a custom calendar webcontrol that a user can select and will dump the date along with some specialized information set in the tooltip. It actually is...
2
3751
by: jodyblau | last post by:
I am trying use a Calendar Control 10.0 in one of my forms. (I am using access 2002) What I want to do is have the user click a button which makes the calendar visible. Then when the user...
1
1311
by: warrengo | last post by:
I have a 2.0 asp app and i'm trying to implement a pop-up calendar. I can get the calendar to pop-up and select a value, but can not get the value to pass back to the calling page. Here is the...
1
6048
by: bellgodz | last post by:
Hello, I have a text box on an .aspx page that an AJAX calendar extender is tied to. When this page is loaded the text box in question is populated with a date from a selected record. I've tried...
0
7132
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
7009
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
7223
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
7390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5475
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
4602
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...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.