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

add button is not show when datasource is empty

Hi,

Add buttons is not showed when the datasource is empty

I attach an example.

Attachment: SyncfusionMvcApplication7_1d2fd96b.zip

8 Replies

BS Buvana Sathasivam Syncfusion Team July 13, 2017 02:29 PM UTC

Hi Manolo,   
  
As per the current structure, we don’t have support to render columns without using data source at initial level.  You can follow the given work around solution.   
   
We have created a Kanban sample with “Add New Card” button.  You can set data source at the initial level if add new card button is clicked.   
    
Please refer to the following code.     
   
KanbanFeature.cshtml   
   
@Html.EJ().Button("button").Size(ButtonSize.Large).ShowRoundedCorner(true).ClientSideEvents(e => e.Click("onClick")).Text("Click to add Card")  // Create Button   
      
<script>   
    function onClick(args) {     
        var obj = $("#Kanban").data("ejKanban");     
        obj.KanbanEdit.addCard(1, { Id: 1, Status: "Open", Summary: "Analyze the new requirements gathered from the customer.", Type: "Story", Priority: "Low", Tags:"Analyze,Customer", Estimate: 3.5, Assignee: "Nancy Davloio", RankId: 1 }); //add card public method   
    }     
</script>   
   
  
   
   
   
Regards,   
Buvana S.   
 



MA Manolo July 13, 2017 03:14 PM UTC

it's possible show your add button when the datasource is empty?

I prefer show only option for add a new card



BS Buvana Sathasivam Syncfusion Team July 14, 2017 08:55 AM UTC

Hi Manolo,  
 
Yes, it is possible to show add button using empty data source.  But, Current behavior of Kanban is to show custom text “No cards to display” when there is no valid matching data found based on key values given.   
 
We have analyzed your requirement for “Render Kanban column with showAddButton using without data source". As this feature is not available in our product, we will consider this as a feature request. If you could confirm some specific details, it would help us to implement the feature in line with your requirement.     
Please review the following screen shot of the feature and let us know if it conforms your requirement. If our definition of this feature is different from your requirement, then let us know the specific details, so that we can work towards fulfilling your requirement.         
 
Screenshot:     
   
Regards,  
Buvana S.  
 



MA Manolo July 14, 2017 10:40 AM UTC

This screenshot is perfect!Meanwhile, in an empty datasource with a custom button for add card. If I set this:obj.KanbanEdit.addCard();The form is not showThanks a lot


BS Buvana Sathasivam Syncfusion Team July 17, 2017 09:43 AM UTC

Hi Manolo,   
  
Thanks for your update and for helping us define this feature.  We have added “Render Kanban column without using data source” to our feature request list and it will be implemented in one of our releases.    
We would appreciate your patience until then.   
  
Yes, if you click custom add button with empty data source, dialog form will not be opened.  The current behavior of Kanban control is that addCard with empty data source does not open the dialog form.  So, we can set data source at the initial level if add new card button was clicked on the first time. 
  
Please let us know if you need any further assistance.   
  
Regards,   
Buvana S.   
 



JA Jacob September 30, 2017 06:23 AM UTC

Hello,

Is this issue have solution?



MA Manolo October 2, 2017 10:49 AM UTC

no yet



NP Narayanasamy Panneer Selvam Syncfusion Team October 2, 2017 12:08 PM UTC

Hi Manolo, 
  
This feature is already requested and it was logged as a feature request in our database. We will implement it in any of our upcoming releases. The feature implementation would also greatly depend on the factors such as product design, code compatibility and complexity. We will update you when this feature has been implemented.  We appreciate your patience until then. 
  
Regards, 
Narayanasamy P.

Loader.
Up arrow icon