Jun 09, 2011, 3:47 PM
[CLOSED] how to disable/clear success handler of directEvent while in the directEvent code
hi,
I'm not able to disable/clear success handler of directEvent while in the directEvent code:
I'm not able to disable/clear success handler of directEvent while in the directEvent code:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
this.tmpPanel.ButtonSave.DirectEvents.Click.Event += ButtonSave_Click;
this.tmpPanel.ButtonSave.DirectEvents.Click.ViewStateMode = ViewStateMode.Enabled;
this.tmpPanel.ButtonSave.DirectEvents.Click.Success =
string.Format("if ( #{{{0}}}.getSelectionModel().hasSelection()){{#{{{0}}}.reload();}} else {{ #{{{0}}}.reload();#{{{1}}}.getForm().reset();}}"
, this.PanelGrid.ClientID
, this.tmpPanel.ClientID);
}
private void ButtonSave_Click(object sender, DirectEventArgs e)
{
//saving code
//if certain case occured i want to clear/disable the execution of Success code at this moment.
this.tmpPanel.ButtonSave.DirectEvents.Click.Success ="";
//but its not working, means it still executed!
}
Last edited by Daniil; Jun 13, 2011 at 4:00 PM.
Reason: [CLOSED]