Hello every1. I came across a code sample for event calendar display as per this page http://www.4guysfromrolla.com/articles/041603-1.2.aspx.
I wanted some urgent help. Its my humble request to all. Here is my situation: I have 3 fields in the table named as Lngr in Gssc.mdf database, namely: ID(Is Identity), date and Description of type date and VarChar(Max) respectively. I just want to simply display the description on the associated date within the calendar but when hovered on a cell of that date, if possible. One more thing I would like to add is that I am using C# with asp.net 3.5 and Sql Database with Sql Express.
Note: Hover part is not much necessary but just if possible, else we can click the date and the description associated with it will be displayed in some label or literal control.
Below I have given a link to the image for the way I want the calendar to display as. I am a starter in site development. so I request all the guys to please help me with less messy and clean solution. will be checking the thread in almost every hour or less time.
The calendar control has DayRender event. In your dayRender event you add an event to the cell attributes that will then create the pop up you require.
Protected Sub Calendar13_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar13.DayRender
Dim onmouseoverStyle As String = "this.style.backgroundColor='#D4EDFF'"
Dim onmouseoutStyle As String = "this.style.backgroundColor='@BackColor'"
Dim rowBackColor As String = String.Empty
e.Cell.Attributes.Add("onmouseover", onmouseoverStyle)
e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor))
If Not e.Day.IsWeekend Then
e.Cell.Attributes.Add("onmouseover", onmouseoverStyle)
e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor))
End If
End Sub
you just need to adapt the code for your own needs.
thnx for ur response... I got a few things to work, my code and markup is given below.... now wat I want is the popup part... I am using tooltip right now, which I dont want at all bcoz of its display... (small font, unwanted background color, etc), so can u get that popup somehow using hovermenu extender or by any other way as shown in my sample image...?
I tried ur suggestion, but I am not able to get through with that... I dont know why, but my laptop is having some serious issues with javascript... I am very much tired of this... so can you plzz give me some code behind code...
sorry but thats kind of rude, try fixing your laptop first and then try work with what is suggested, post your progress code. To say your to tired of this, it ain't my problem, I've gave you code but you not only want me to write it for you, you also want me to write it another way for you, sorry but you have no chance of that from me.
I dont know how to correct those errors, and I didnt asked to write all the code for me... I am jst asking for suggestions like you gave earlier... I want alternative for javascript, thats all I am asking sir... I am new to this world, so I after trying many things for almost 1 month I decided to ask for guidance but not to provide me with a prepared recipe... I really apologise if you felt so...
Bookmarks