Data update and preventing dragging

Hi all,

I use the SfKanban control to visualize data coming in via network. 
As I’m using the control as view-only component I need to prevent the user from moving the cards around.
How can I disable the dragging completely?

The data for the kanban is coming in via network every 2 seconds. Changes to the data source are only recognized by the control when I call ReloadKanban(). But this function doesn’t recognize if a KanbanModel has been removed from the data source. This is not reflected by the control unless I rebind the data source by setting ItemSource again which is very inefficient. 
How can I tell the control to update its data in the most efficient way?

How can I customize the colums? E.g. remove item count.

Is it possible to have two columns for one simgle category?


Thanks for your help!
Regards,
Michael



9 Replies

GR Geetha Rajendran Syncfusion Team October 10, 2018 08:46 AM UTC

Hi Michael, 
 
Thanks for using Syncfusion support. 
 
Query 1: How can I disable the dragging completely? 
We can achieve this requirement with the help of AllowDrag property which is available in KanbanColumn. We have prepared a simple sample for your requirement and it can be downloaded from the below link. 
 
Code snippet[C#] 
KanbanColumn progressColumn = new KanbanColumn(); 
progressColumn.AllowDrag = false; 
 
 
Query 2: How can I tell the control to update its data in the most efficient way? 
 
The efficient way to update the data is through the Kanban model, we have prepared a sample to replicate the issue but we are not able to reproduce the issue at our end. We have attached a simple sample. Please revert us by modifying the sample based on your application along with replication procedure. This would be helpful for us to give better solution. 
 
Query 3: How can I customize the colums? E.g. remove item count. 
Query 4: Is it possible to have two columns for one simgle category? 
Currently we are validating these scenarios and will update you the status of this in 1 business days, 10th October 2018. We appreciate your patience until then.  
 
 
Thanks, 
Geetha R 



MI Michael October 10, 2018 03:03 PM UTC

Hello Geetha,

First of all thanks for your help!

I checked your example but it only covers half of my problem. 
1) The itemsource must obviosly of type ObservableCollection although the type of ItemSource is IEnumerable. This is also implememted by List<> but then nothing works.
2) If ItemSource is of type ObservableCollection only adding/removing entries are recognized. Changing the Description isn't recognized unless ReloadKanban() is called,
    but then removing/adding doesn't work any more.

I created an small example that demonstrates my problem. Please check the comments in my code for more information.

Michael

Attachment: App1_e0bead82.zip


ADDENDUM:
     In the meantime I found out the following:
          My example has 4 cards and 2 columns, 2 cards in each column. The added example removes a card in the second column and tries to update the description of
          another card in the first column. This doesn't work correctly. BUT if both cards are in the same column it works! There seems to be a problem in SfKanban
          when changing data in multiple columns.


MP Michael Prabhu M Syncfusion Team October 12, 2018 12:54 PM UTC

Hi Michael, 

Query 1: Changing the Description isn't recognized unless ReloadKanban() is called. 
Query 2: How can I customize the columns? E.g. remove item count.  
Due to some complexity there is a delay, we are preparing a feasible workaround sample for your requirement. We will update you the status on Monday 15 October, 2018. 

Query 3: Is it possible to have two columns for one single category?  
If you add two columns for same category means, the items under the two categories are exactly same. If your requirement is different from this means, please give more details on the requirement so that we can validate it to provide better solution. 

Thanks, 
Michael 
 



MI Michael October 14, 2018 03:41 PM UTC

Hi Michael,

With two columns for one single category, I mean that all cards in that category are equally splitted in two columns. So if i.e. 7 KanbanModel/Cards belong to category "MyCategory" the display of those 7 cards are splitted into 4 cards for first column and 3 cards for second column. I have quite a lot of items belonging to one category but not so many categories therefore I would like to use more horizontal space instead making the user to scroll a lot.

Thanks
Michael


MP Michael Prabhu M Syncfusion Team October 15, 2018 12:37 PM UTC

Hi Michael, 
  
Query 1: Changing the Description isn't recognized unless ReloadKanban() is called. 
Currently this is the way to change the description, we will consider this as an improvement in our control and will include this in our improvements list. This will be available in any of our upcoming releases.                                                   
  
Query 2: How can I customize the columns? E.g. remove item count.   
We have prepared a sample for your requirement, by extending KanbanDelegate. You can download the sample from the below link.  
  
Sample: 140257_custom 
  
Code snippet [C#]: 
this.kanban.Delegate = new CustomKanbanDelegateHelper(); 
  
  
public class CustomKanbanDelegateHelper : KanbanDelegate 
{ 
        public override UIView GetHeaderView(Syncfusion.SfKanban.iOS.KanbanColumn column,int columnPosition) 
        { 
            UIView view = base.GetHeaderView(column, columnPosition); 
            int length = view.Subviews.Length; 
  
            for (int i = 0; i < length; i++) 
            { 
                foreach (var subview in view.Subviews) 
                { 
                    foreach (var sub in subview.Subviews) 
                    { 
                        UILabel labelView = sub as UILabel; 
                        if (labelView != null) 
                        { 
                            labelView.RemoveFromSuperview(); 
                        } 
                    } 
                } 
            } 
  
            UILabel titleLabel = new UILabel(); 
            UILabel limitsLabel = new UILabel(); 
            if (column.IsExpanded) 
            { 
                titleLabel.BackgroundColor = UIColor.Clear; 
                titleLabel.Frame = new CGRect(0, 10, 200, 40); 
                titleLabel.TextAlignment = UITextAlignment.Natural; 
                titleLabel.Text = column.Title; 
                view.AddSubview(titleLabel); 
            } 
  
            return view; 
        } 
} 
 
  
  
Query 3: Is it possible to have two columns for one single category?   
Cards are grouped based on the Category only. So, we are afraid we cannot consider this requirement as a feature request. If you want to display two columns in same category, you have to create another one category (e.g. To Do1) in sample level.  
Thanks, 
Michael 



MI Michael October 16, 2018 07:23 AM UTC

Hi Michael,

thanks for your reply.
But did you check my example? Especially the following

2) If ItemSource is of type ObservableCollection only adding/removing entries are recognized. Changing the Description isn't recognized unless ReloadKanban() is called, but then removing/adding doesn't work any more.

If I change the Description with a call to ReloadKanban() the deletion of elemenmts are no longer recognized. Please check my example from above message.

Thanks
Michael


MP Michael Prabhu M Syncfusion Team October 17, 2018 12:13 PM UTC

Hi Michael, 
                                         
We are afraid, currently there is no support to update the underlying KanbanModel. Due to some limitations this cannot be done in sample level as well. So, we have included this in our feature requirement list, while this feature itself is important we cannot provide you an exact timeline on when this feature will be available in our suite, this will be available in any of our upcoming releases. 

Thanks, 
Michael 




MI Michael January 14, 2019 02:18 PM UTC

Hi,

any news on when the mentioned features/impovements are included in your suite?

Regards
Michael


MP Michael Prabhu M Syncfusion Team January 17, 2019 03:48 AM UTC

Hi Michael, 
Thank you for requesting this feature and helping us define it. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts. We have added this feature request to our database. You can now track the current status of this feature request here. 
At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We will let you know when this feature is implemented. 
You can also communicate with us regarding the open features any time using our Feature Report page. 
Regards,
Michael Prabhu
 



Loader.
Up arrow icon