Serenity: How to refresh grid after close dialog

Created on 11 Mar 2016  路  7Comments  路  Source: serenity-is/Serenity

I have a diolog with submit approval button, i want after click this button and dialog close it will be refresh grid how to do that?

buttons.Add(new ToolButton
{
Title = Q.Text("Submit Approval"),
CssClass = "users-button",
OnClick = delegate
{
System.Action submit = delegate
{
ApprovalService.SubmitApproval(new ApprovalSumbitRequest
{
AppFormID = this.Entity.AppFormId.Value,
UserID = Authorization.UserDefinition.UserId,
ApprovalLevel = 0,
IsSendingRequest = true
}, response =>
{
if (response)
{
Q.NotifySuccess("Approval has been send");
DialogClose();
}
}
);
};
Q.Confirm("Are you sure want to submit this approval?", submit);
}
});

Most helpful comment

this works for me : Serenity.SubDialogHelper.triggerDataChange(this);
thanks 馃挴 馃憤

All 7 comments

Call this.TriggerDataChange() before closing dialog.

Thanks Jaiq, it works.

then what to do with this question in typescript ?

Call this.triggerDataChange() before closing dialog.

hi dear Volkan. i use it in that way but there is not such method in my refrences and there is an error.
"Property triggerDataChange does not exists in XYZdialog.ts". then i've searched about the method and found it here : "Serenity.TypeScript.CoreLib/UI/Helpers/SubDialogHelper.ts"
how i can use this file or its container package in my proj ? thanks for helps.

this works for me : Serenity.SubDialogHelper.triggerDataChange(this);
thanks 馃挴 馃憤

Join us on Slack
Get Invitation
Login

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ahsansolution picture ahsansolution  路  3Comments

ga5tan picture ga5tan  路  3Comments

stixoffire picture stixoffire  路  3Comments

dkontod picture dkontod  路  3Comments

dudeman972 picture dudeman972  路  3Comments