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
close icon

Repeat header in each group

For a grouped SFDataGrid, how can I have the header repeated for each group?

8 Replies

AN Ashok N Syncfusion Team August 9, 2016 10:42 AM UTC

Hi Patrick   
  
Thank you for contacting Syncfusion Support.   
  
We have checked your query and we are unable to understand your requirement clearly. If your requirement is to freeze the caption row of a group at the top until the group records are completely scrolled out of the view and then replace the frozen caption row with the caption row of the next group? we currently do not have support for this. However, this has been already considered as a feature and added to our Feature management list and this feature will be available in any of our upcoming release. 

Otherwise, if your requirement is to customize the text of the caption rows to be identical for the groups then you can achieve it in two ways, either by customizing the GroupCaptionText or by writing a converter for the GroupColumnDescription.    
  
You can customize the GroupCaptionText by using SfDataGrid.GroupCaptionTextFormat property.  Please refer the below UG link, to get more information about GroupCaptionText customization.   
  
You can write the Converter to GroupColumnDescription and return the Key value. We have prepared a sample based on this and attached it in the below sample link, please refer it.     
  
Regards,   
Ashok 


PB Patrick Burrows August 9, 2016 11:34 AM UTC

If your requirement is to freeze the caption row of a group at the top until the group records are completely scrolled out of the view and then replace the frozen caption row with the caption row of the next group?

Yes, this. The freezing isn't even important. 



AN Ashok N Syncfusion Team August 10, 2016 06:35 PM UTC

Hi Patrick, 
 
Thanks for your update. 
 
We could not understand your requirement clearly. Could you please confirm you need to show the same caption text in all group, like in the below screenshot? You can achieve this by using SfDataGrid.GroupCaptionTextFormat property. Please refer the below code example  
SfDataGrid.GroupCaptionTextFormat = “GroupCaptionText”; 
 
 
 
 
Also you can achieve this by using Converter in GroupColumnDescription. We have update the sample for this in our previous update, please refer it. 
 
Or you need to freeze the caption row of a group at the top until the group records are completely scrolled out of the view and then replace the frozen caption row with the caption row of the next group? In the below screenshot we have mention about GrouCaptionText and group records.  
 
 
 
If your requirement is deferring from this, could you please share screenshot based on your requirement, that would be more helpful for us to serve you better? 
 
Regards, 
Ashok 



PB Patrick Burrows August 10, 2016 06:45 PM UTC

Here is the layout I was trying to accomplish (using random strings):

So 2 groupings (one with the grey background, one bolded with a white background).

Inside of each inside group, is a table that contains the headers.




PB Patrick Burrows August 10, 2016 06:50 PM UTC

(also, the example above has only one inner-grouping (the one that is bold, with a white background) for each outer grouping. There could, of course, be many outer groupings, that's just the example I chose).


AN Ashok N Syncfusion Team August 11, 2016 10:00 AM UTC

Hi Patrick, 
 
Thanks for your update, 

Currently we do not have support for multilevel grouping with DetailsView datagrid. However, this has been already considered as a feature and added to our Feature management list and this feature will be available in any of our upcoming release.  
 
Regards, 
Ashok 



PB Patrick Burrows August 11, 2016 02:44 PM UTC

The original question was this:
For a grouped SFDataGrid, how can I have the header repeated for each group?

I was just going to fake the second level of grouping using multiple views


AN Ashok N Syncfusion Team August 12, 2016 12:21 PM UTC

Hi Patrick, 
We had checked your reported query at our end. It can be achieved using the DetailsView datagrid only. Currently, we do not have support for DetailsView datagrid in the Xamarin. However, we had considered this feature and it will be implemented in any of our upcoming release.  
Regards, 
Ashok 


Loader.
Live Chat Icon For mobile
Up arrow icon