We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Dialog template

Could i make different dialog windows for editing and adding cards?

3 Replies

BS Buvana Sathasivam Syncfusion Team May 25, 2017 05:08 PM UTC

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. 



EP Eugene Pribytkov May 28, 2017 11:33 AM UTC

Thank you for your answer!)


BS Buvana Sathasivam Syncfusion Team May 29, 2017 06:23 AM UTC

Hi Eugene,   
  
Thanks for your update.  Please let us know if you need any queries, we would be happy to assist you.   
  
Regards,  
Buvana S. 


Loader.
Live Chat Icon For mobile
Up arrow icon