Grid Layout

Hi,

How can  i add the tools (button,label,entry etc) and structures (items, list, multitools,images) to Grid Layout?

3 Replies

JN Jayaleshwari N Syncfusion Team August 16, 2018 06:02 AM UTC

Hi Pinar, 
 
Thanks for Contacting Syncfusion Support. 
 
We have checked your query “Adding tools and structures in GridLayout” is not clear. Whether you are asking about grouping the controls in GridLayout. 
Could you please share your requirement clearly or share screenshot which depicts the use case with GridLayout which would highly help us to provide appropriate solution. 
 
Please refer the documentation for ListView GridLayout. 
 
Regards, 
Jayaleshwari N. 



AP Ashwini Paranthaman Syncfusion Team August 16, 2018 08:36 AM UTC

From: Pinar Can 
Sent: Thursday, August 16, 2018 2:28 AM
To: Syncfusion Support
 
Subject: YNT: Syncfusion support community forum 139277, Grid Layout, has been updated. 

Hi, 
Let me explain more. 
1)In your listview /layouts /GridLayout documentation topic, GridLayout has been full with “Image”. BUT, I want to add buttons,labels or a struct that contains also buttons,labels,entries etc. 
 
2)About the “Grouping” topic: 
                For example, i have a list which contains fruits and i grouped my list according to “fruits kinds”. So my  “PropertyName=”FruitsKinds”. BUT I want to decide on the order in which the fruit will be. 
For example: my fruits list are apple, banana ,strawberry, pear ,watermelon with their properties(piece, gram, price ). When I ordered my fruits kinds list, it’s automatically alphabetical sorting. But I want to decide that, 
If fruit price>30,  ->first group 
If fruit price>50 & price<60, ->second group 
If fruit price>60 & price<100, ->third group and goes on. 
So, how can I sort my list according to it’s properties? 



JN Jayaleshwari N Syncfusion Team August 17, 2018 12:31 PM UTC

Hi PinarCan,  
  
We have checked the reported query from our end. We have prepared the sample based on the information given by you. In our sample we have loaded the listview in grid layout with image, label, button and grouped the items based on the fruit name and add the custom grouping logic.   
  
Code Example[C#]:  
listView.DataSource.GroupDescriptors.Add(new Syncfusion.DataSource.GroupDescriptor()  
    {  
        PropertyName = "Name",  
        KeySelector = (object obj) =>  
        {                      
            var item = (obj as Product);  
            if (item.Price< 50)  
                return item.Type = viewModel.Type[0];  
            else if (item.Price< 60)  
                return item.Type = viewModel.Type[1];  
            else if (item.Price< 100)  
                return item.Type = viewModel.Type[2];  
            else  
                return item.Type = viewModel.Type[3];  
        },  
                  
    });  
  
For your reference we have attached the sample and you can download it from the below link.  
  
  
Please let us know if you require further assistance.  
  
Regards,  
Jayaleshwari N. 


Loader.
Up arrow icon