Hi,
I use a CollapsiblePanelExtender (Ajax control) with 2 panels. In one of these panels I insert LI in the Form_load like this :
Dim ctrl0 As HtmlGenericControl = New HtmlGenericControl("ul")
Dim ctrl As Control = FindControl("ContentPanel")
Dim pnl As Panel = TryCast(ctrl, Panel)
pnl.Controls.Add(ctrl0)
Dim iLen As Int16 = 0
Dim i As Int16 = 0
While i < 10
'Cr un nouvel lment liste
Dim oLiControl As HtmlGenericControl = New HtmlGenericControl("LI")
oLiControl.InnerText = "toto" & i.ToString
If Not ctrl Is Nothing Then
If Not pnl Is Nothing Then
pnl.Controls.Add(oLiControl)
oLiControl.InnerHtml = [String].Format(" <span onmousedown='return DayPilotCalendar.dragStart(this.parentNode,60*60,""0"",""" & oLiControl.InnerText & """);' >" & oLiControl.InnerText & "</span>")
oLiControl.Attributes("style") = " cursor:move "
oLiControl.Attributes("unselectable") = "on"
End If
End If
i = i + 1
End WhileDim ctrlFin As HtmlGenericControl = New HtmlGenericControl("/ul")
pnl.Controls.Add(ctrlFin)
In the DayPilotCalendar_eventMove, I update the datas and refresh my ContentPanel in order to fill again the LI draged into the calendar (the drag and drop delete the selected line LI from the ContentPanel).
The problem is that when I try to delete all the lines and fill the ContentPanel, nothing happen. If I delete the instruction : daypilotcalendar1.Update(CallBackUpdateType.Full), it works.
I need to have always the contentPanel with all the lines.
How can I do to have the update on the calendar and the update in the contentpanel?
The update in the contentPanel is :
Dim ctrl As Control = FindControl("ContentPanel")
Dim pnl As Panel = TryCast(ctrl, Panel)
Dim nbContrl As Int16 = pnl.Controls.Count
Dim i As Int16 = 0
While i < nbContrl
Dim oCtrl As Control = pnl.Controls(0)
pnl.Controls.Remove(oCtrl)
i = i + 1
End While
Dim ctrl0 As HtmlGenericControl = New HtmlGenericControl("ul")
pnl.Controls.Add(ctrl0)
Dim iLen As Int16 = 0
i = 0
While i < 10
'Cr un nouvel lment liste
Dim oLiControl As HtmlGenericControl = New HtmlGenericControl("LI")
oLiControl.InnerText = "toto" & i.ToString
If Not ctrl Is Nothing Then
If Not pnl Is Nothing Then
pnl.Controls.Add(oLiControl)
oLiControl.InnerHtml = [String].Format(" <span onmousedown='return DayPilotCalendar.dragStart(this.parentNode,60*60,""0"",""" & oLiControl.InnerText & """);' >" & oLiControl.InnerText & "</span>")
oLiControl.Attributes("style") = " cursor:move "
oLiControl.Attributes("unselectable") = "on"
End If
End If
i = i + 1
End While
Dim ctrlFin As HtmlGenericControl = New HtmlGenericControl("/ul")
pnl.Controls.Add(ctrlFin)
Thanks for your help.
Sylvie