Hi there !
I'm coming here cause i'm in trouble since a couple of hours !
My problem is : I have some checkboxs who can hide or not some event in my daypilot calendar. At the moment, when I check a box, my item is not refreshed in the daypilot, but when I put a link who use my javascript function to refresh. It works ! So now i would like to do the same without a click on the link. When i change the box, i would like to call my js function to do the same... but it doesn't works !
Here is my link + checkboxs in my repeater :
<a href="javascript:checkedChanged();">refresh</a>
<asp:ScriptManager ID="SM1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Repeater ID="repeaterAct" runat="server">
<HeaderTemplate>
<div style="font-weight: bold; top:10;">Affichage par activité</div>
</HeaderTemplate>
<ItemTemplate>
<div>
<asp:CheckBox ID="CBAct" runat="server" Checked="false" Text='<%# Eval("libelléActivité") %>' AutoPostBack="true" OnCheckedChanged="CBAct_CheckedChanged" />
</div>
</ItemTemplate>
</asp:Repeater>
</ContentTemplate>
</asp:UpdatePanel>
Here is my js :
function checkedChanged() {
//alert("checkedChanged");
dpc1.commandCallBack('refresh');
}
And this is my codeBehind :
protected void CBAct_CheckedChanged(object sender, EventArgs e)
{
DayPilotCalendar1.DataBind();
//DayPilotCalendar1.Update();
ScriptManager.RegisterStartupScript(this, GetType(), "refresh", "checkedChanged();", true);
}
So when i press my checkbox, my data is rebind. At this moment, if i click on my link refresh, my DayPilot is refreshing and all looks good ! What I don't understand is : my CBAct_CheckedChanged function launch my JS function correctly (when I put the alert, it's nicely triggered !), so why my DayPilot is not well refreshing when I changed my checkboxs ?
Thx for yours answers !!