Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have begun using the calendar control, but I have discovered that any text I add during the dayrender event is being wrapped way to early. Each day column is 200px wide, but the text "Class 101 (0/9)" is being wrapped before the paranthesis. No matter how wide I make my day columns, it is always the same thing.

 

Here is my DayRender event

  Private Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender
     Dim sb As System.Text.StringBuilder

     If e.Day.Date.Day = 18 Then
        sb = New System.Text.StringBuilder("<br>")
        sb.Append("<a href='http://www.msn.com'>Class 101 (0/8)</a><br>")
        sb.Append("<a href='http://www.yahoo.com'>Class 123 (2/6)</a><br>")
        sb.Append("<a href='http://www.edmunds.com'>Class 563 (6/6)</a><br>")
        sb.Append("<a href='http://www.edmunds.com'>Class 666 (1/12)</a><br>")
        e.Cell.Controls.Add(New LiteralControl(sb.ToString))
     End If
  End Sub

 

Thanks,

 

Rob

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...