Hi Eugene Pribytkov,
Thanks for using Syncfusion Products.
We don’t have support to use different dialog for editing and add dialog. But we can dynamically hide the elements by setting custom classed to the dialog contents.
If editing dialog form shows Id, Status, Assignee and Summary fields:
If adding dialog form shows Id, Status, Estimate, Assignee, Tags, Priority and Summary fields:
This different content in dialog can be achieved by adding a class to the any element of the template and apply the “display” property on actionComplete event. Please refer to the following code.
<div id="template" style="display: none">
<table cellspacing="10" style="border-spacing: 11px;">
<tr class="tableRow"> // Add class name on row
……
</tr>
Or Else
<tr>
<td class="tableCell" style="text-align: right;"> // Add class name on cell
…
</tr>
</table>
</div> |
@(Html.EJ().Kanban("Kanban")
……
.ClientSideEvents(eve => {eve.ActionComplete("complete");})
)
<script>
function complete(args) {
……
if (args.requestType == "beginedit") { // edit the card
$(".tableRow").removeClass("e-row").addClass("e-none"); // add class and remove class
$(".tableCell").removeClass("e-cell").addClass("e-none");
}
else if (args.requestType == "add") { // Add new card
$(".tableRow").removeClass("e-none").addClass("e-row");
$(".tableCell").removeClass("e-none").addClass("e-cell");
}
}
</script>
<style>
.e-cell{
display: table-cell;
}
.e-row{
display: table-row;
}
.e-none{
display: none;
}
</style> |
Please let us know if you have any further assistance.
Regards,
Buvana S.