HierarchicalGrid using syncfusion Xamarin forms

We have a requirement to create hierarchical grid for our Xamarin forms.  We are advised to use syncfusion controls to get it done.   During our initial analysis, we feel not all features can be implemented using the syncfusion grid.   Could you please help us to validate this?

The grid layout what we are looking for is as follows.



 Is there any way to directly implement hierarchical grid using syncfusion?

2.       Can we implement the expand/collapse feature based on the grouped view?

3.       Can we add rows at runtime? [by providing an add row feature]

4.       How flexible is to customize a cell look and feel

a.       Background color

b.      Enable/disable

c.       Adding custom controls to a cell like labels/buttons/images. Sometimes we may have to support image and label (both) in a single cell. 

We tried to implement above features using the sfDataGrid, using the grouping features, but unfortunately we are unable to customize and get all the features as we were expected.

Is it possible to get a working sample?  

We are currently working on Xamarin forms version 4.6.0.299  with .net version 4.6.01055 in Visual Studio 2017. We have Windows 10 operating system.




9 Replies

AN Ashok N Syncfusion Team November 14, 2017 01:35 PM UTC

Hi Joseph, 

Thanks for contacting Syncfusion support. 

Could you please confirm your current SfDataGrid product version? That would be help us to proceed further on your queries. Because we have check and you having product version 9.1 support but Xamarin Forms is not available in that version.  

Regards, 
Ashok 



JM Joseph Michael November 15, 2017 10:45 AM UTC

Hi Ashok,

         We have used these following components :

  1. Syncfusion.Xamarin.DataSource
  2. Syncfusion.Xamarin.GridCommon
  3. Syncfusion.Xamarin.SfDataGrid
  4. Syncfusion.Xamarin.SfNumericTextBox
For all the above component, the version is 15.3.0.29

Please let us know if the features posted in this thread above, can be achieved using the latest version of Sync Fusion?

NoteWe are licensed for all syncfusion mobile products including version 15.4 which is the latest release .








AN Ashok N Syncfusion Team November 15, 2017 04:24 PM UTC

Hi Joseph,  

Thanks for your update and currently we do not have HierarchicalGrid and AddNewRow support in our SfDataGrid Xamarin platforms. We have tried to create incident on your behalf and we were unable to do the same as your portal version is 9.1.0.24. We request you to contact your portal admin to change the product version so that we can create the incident and provide the complete details regarding the feature. Else you can also create the new incident for the below query to get the details.  

Regards, 
Ashok 



JM Joseph Michael November 17, 2017 04:13 PM UTC

Hi Ashok,
   
           Do we have the hierarchical and Add new row support in Independent Platforms? Xamarin.IOS and Xamarin.Android.?




AN Ashok N Syncfusion Team November 18, 2017 06:13 AM UTC

Hi Joseph, 
 
Regarding your query “HierarchicalGrid”: 
Currently we do not have support for “HierarchicalGrid” in all Xamarin platforms(Xamarin.Forms, Xamarin.Android and Xamarin.iOS) and also provided screenshot is desktop view so please confirm your requirement about this “HierarchicalGrid” support in mobile platforms? Whether you want same desktop view in mobile or you need any other Hierarchical view to shows the SfDataGrid in mobile? these details will be help us while implementing this feature. 
 
Query regarding AddNewRow: 
Currently we do not have support for AddNewRow in all Xamarin platforms(Xamarin.Forms, Xamarin.Android and Xamarin.iOS). We have added it to our new feature request list, and this feature will be available any of our upcoming release.  
 
Query regarding expand/collapse grouped view: 
In our SfDataGrid we can able to Expand and Collapse the group by setting AllowGroupExpandCollapse as True. By default this values was false. Please refer the below UG link to get more details about the this: 
 
Query regarding customize a cell: 
You can customize the GridCell by using CellStyle property. you to apply styles for the GridCell in a column based on conditions by writing a converter for the property in GridCell. Please refer the below UG link for more details: 
 
Also you can customize the  style to SfDataGrid by writing a Style class overriding from DataGridStyle and assigning it to the SfDataGrid.GridStyle property. Please refer the below UG link: 
 
Adding Custom control in Cell: You can added your custom control in cell using GridTemplatecolumn. It allows you to extend the functionality of GridColumn with your own view by creating the CellTemplate or CellTemplateSelector. Please refer the below UG link for more details: 
 
If your requirement differ from this please share more details regarding your query that will be help us to proceed further. 
 
Regards, 
Ashok 



JM Joseph Michael November 20, 2017 02:24 PM UTC

We would like to discuss few more points related to simple grouping in xamarin forms.

We have a large set of data, which needs to be grouped and displayed group summary as given in blow image.
In the group header. we should have same number of columns to be present as of detailed row and we should be able to display the some information  (may be summary of grouped data  or any other arithmetic operations based on grouped data).

Also please let us know if we can merge multiple columns and display it as a single cell ( in the given image, first 3 columns are merged and added a static text as 'sub total')

Please let us know if this can be achieved using sync fusion grid for xamarin forms. 



Thanks










AN Ashok N Syncfusion Team November 21, 2017 09:02 AM UTC

Hi Joseph, 

Regarding your query “Summary Column”:  

SfDataGrid allow to set the both Summry for Row and summary for Column. You can achieve your requirement by adding Summary column in CaptionSummaryRow and set the GridSummaryRow.ShowSummaryInRow as False. Please refer the below UG link to get mode details about the column summary. 


Regarding your query “GridCell merge”:  

Currently we do not have support for Merge cell in all Xamarin platforms(Xamarin.Forms, Xamarin.Android and Xamarin.iOS). We have added it to our new feature request list, and this feature will be available any of our upcoming release. 

Regards, 
Ashok 



JM Joseph Michael November 22, 2017 11:16 AM UTC

Thanks for providing us the information required to implement summary row. 

We would like to know few more information related to grouping

  1.  is it possible to hide the column on which the grouping is applied?    (Lets say in the previous screenshot, the data is grouped based on the year, can we hide the year column form the grid)
  2. Can we add a static text or image on the column header ? 





AN Ashok N Syncfusion Team November 23, 2017 06:13 PM UTC

Hi Joseph, 
 
Thanks for your update. 
 
Regarding Query 1: 
In our SfDataGrid Xamarin platforms does not have support for ShowColumnWhenGrouped (like WPF SfDataGrid control).  
Group has been created based on the ColumnName. So, if you don’t want to show the Grouped column name in view, don’t add that column name in SfDataGrid.Columns for manually added columns. For AutoGenerated columns you can set Column Width as 0 by handling AutoGeneratingColumn event. Please refer the below ug link to get more details about AutoGeneratingColumn event: 
 
Regarding Query 2: 
Also, you can customize the HeaderText by using HeaderTemplate property. Please refer the below KB to get more detail about HeaderTemplate use.  
  
  
 
Regards, 
Ashok

Loader.
Up arrow icon