Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Dropdown to Calendar Control 1

Status
Not open for further replies.

ERules

Programmer
Jul 24, 2003
9
US
Can it be done? I am getting an error that says the schema doesn't support a web control within a web control.
 
I want to add a list of years to the control for the purpose filling in date of birth fields. Sometimes that can be many years back and so I want to make it easier for the user to navigate to a specific year.
 
I have to admit, I don't know what you're getting at. I have a calendar.aspx and calendar.js. I use a hyperlink to call the calendar as a new window and then feed the date back to the opener.
 
You say that you are getting an error so there must be some code that you are running to produce this error. What is it?


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Thanks for sticking with me ca8msm, I get an error trying to put a dropdownlist inside the title tags of the calendar control. Is there a way to tie a dropdownlist together with a calendar control?
 
Not like that. You can probably do it dynamically in one of the Calendar's events (using Controls.Add) but it's not as easy as just dropping a control in between tags.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Thanks again, you've got me thinking. what if i entered a click event for a specific spot on the control and then use the controls.add?
 
You cannot add child controls to the calendar control. You have 2 options, 1.)Get a 3rd party control, 2.)Create your ow Custom Web Control.
 
Jim,

That's not strictly true, it's just that it can't be done like the OP was attempting. For example, you could add a control to each cell like this:
Code:
    Protected Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender
        e.Cell.Controls.Add(New TextBox)
    End Sub


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Cool.. I have to try that. I was trying to add a control to the calendar itself, like in the header. I thought maybe they wanted a ddl of month names etc. I never tried to add it to a cell of the calendar.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top