Jump to content

Recommended Posts

Posted

Hi!

 

Is there solution to add custom title for Grouping title? I made UniDBGrid with grouping by date and there I get  like grouping title :

 

Date: 6/8/2015

 

I need to put day name in grouping title like

 

Date: Monday, 6/8/2015

 

Is there some solution?

 

Thanks!

 

 

Posted

Hi,

 

You can use groupHeaderTpl

 

Try to analyze this example:

 

1. Open: "C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\GridGrouping\grp.dproj"

 

2. Change grouping FieldName:

post-906-0-67360300-1434403430_thumb.png

 

3. UniDBGrid1 -> ClientEvents -> UniEvents -> add function beforeInit

function beforeInit(sender, config)
{   
  var groupingFeature = Ext.create('Ext.grid.feature.Grouping',{
        groupHeaderTpl: 'Date: {[Ext.util.Format.date(Ext.Date.parse(values.name, "d.m.Y G:i:s"), "l, d/m/Y")]}',
        hideGroupedHeader: true
    });
  config.features = [groupingFeature]
}

post-906-0-98102900-1434403487_thumb.png

 

4. Result:

post-906-0-36820600-1434403626_thumb.png

 

Note: you may have a different date format

 

Best regards.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...